首页 > 学院 > 开发设计 > 正文

协议的作用

2019-11-09 16:27:10
字体:
来源:转载
供稿:网友
@PRotocle ExampleProtocol<Nsobject>-(void)exampleProtocol;@end@interface ExampleClass:NSobject{}@property (nonatomic,assign) id<ExampleProtocol> delegate;@end

1.通过协议对外提供接口 2.protocol 可以当成 java 中的 interface


上一篇:RN7_React-Native实战(3)

下一篇:IPC机制

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表