首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

Target-Action回调模式

property (nonatomic, strong) id target; @property (nonatomic, assign) SEL action;   //声明目标动作注册方法 -(void) addTarget...//  ComponentOne.m //   #import "ComponentOne.h"   @implementation ComponentOne //实现组件中的注册方法 -(void)addTarget...2.属性action用于接收目标对象的方法,也就是要在目标对象中要回调的方法             3.addTarget: Action:方法用于注册目标动作,说白了目标对象和目标对象的方法是通过这个方法传入到组件中的...        self.oneComponent = [[ComponentOne alloc] init];         //注册组件一的回调方法         [self.oneComponent addTarget...        self.twoComponent = [[ComponentTwo alloc] init];         //注册组件二的回调方法         [self.twoComponent addTarget

94590

扫码

添加站长 进交流群

领取专属 10元无门槛券

手把手带您无忧上云

扫码加入开发者社群

相关资讯

热门标签

活动推荐

    运营活动

    活动名称
    广告关闭
    领券