Reputation: 502
For example, I have MyFancyData
protocol. How can I specify that MyFancyDataClass property accepts only classes that conforms to this protocol.
@interface MyObject : NSObject
@property Class MyFancyDataClass;
Upvotes: 3
Views: 884
Reputation:
Do you mean something like this?
@interface MyObject : NSObject
@property (nonatomic, assign) Class<MyFancyData> cls;
@end
Upvotes: 1