How to define and implement properties in protocol
问题 I want to define one protocol with few properties and need to use those properties in another NSObject subclass. Please give me link or example code. I need that to work with 10.5. Thanks PLEASE CHECK THE FOLLOWING SAMPLE CODE @protocol MyProtocol @property (nonatomic, readonly) id someObject; @property (nonatomic, getter=isAlive) BOOL alive; @end #import "MyProtocol.h" @interface MyCustomClass : NSObject <MyProtocol>{ } @end #import "MyCustomClass.h" @implementation MyCustomClass @synthesize