@protocle ExampleProtocol<Nsobject>
-(void)exampleProtocol;
@end
@interface ExampleClass:NSobject{
}
@property (nonatomic,assign) id<ExampleProtocol> delegate;
@end
1.通过协议对外提供接口
2.protocol 可以当成 java 中的 interface
@protocle ExampleProtocol<Nsobject>
-(void)exampleProtocol;
@end
@interface ExampleClass:NSobject{
}
@property (nonatomic,assign) id<ExampleProtocol> delegate;
@end
1.通过协议对外提供接口
2.protocol 可以当成 java 中的 interface