Welcome to the Treehouse Community
Looking to learn something new?
Introduction to objective-c
I cannot seem to get passes the 3rd stage of the challenge for this section. the question reads "Finally, we have a class named 'Bling' which needs to have a property called 'ruby'. Switch over to 'Bling.h' and add a property named 'ruby' that belongs to the class 'Ruby'.
they give you
- @interface bling : NSObject 2.
- @end 4.
I have ried many things but can't seem to work it out! any help would be much appreciated :)
Ben Falk3,167 Points
Hopefully this helps get you started...
- You need to add an @property to Bling.h
- Remember that for most properties (unless you have something specific that would change this), you need to set nonatomic and strong
- You need to create "ruby", which belongs to the class "Ruby"
- Remember the *, since you are creating a pointer to an object
The format looks something like this:
@property (nonatomic, strong) Class *name;