Reputation: 6975
I want to add my custom NSObject class to other as property, is that possible?
Class look like this:
@interface PlaceHolder : NSObject
@property (strong, nonatomic) NSString *name;
@property (strong, nonatomic) NSString *description;
@property (strong, nonatomic) NSString *webPage;
I want to make it property of my other class to initialize it once, and then work with properties - name, description. webpage and other..
Do i need to create a category? Or there is another way to achieve this?
Any advice would be appreciated, thank you.
Upvotes: 0
Views: 28
Reputation: 8629
Just add a property to the class that needs to use it
@property (strong, nonatomic) PlaceHolder *placeHolder;
Upvotes: 1