OCios中代理的使用如何使用

OC 代理机制如何理解? - 知乎41被浏览<strong class="NumberBoard-itemValue" title="分享邀请回答311 条评论分享收藏感谢收起03 条评论分享收藏感谢收起OC 中委托代理的问题
为什么我的 if ([self.Delegate respondsToSelector:@selector(findVideo)]) {
[self.Delegate findVideo];
}为false 无法触发
//如果代理实现了findViedeo方法,则代理调用findVideo方法
if ([self.Delegate respondsToSelector:@selector(findVideo)]) {
//调用findVideo方法
[self.delegate performSelector:@selector(findVideo)];
}要想这行[self.delegate performSelector:@selector(findVideo)];代码调用,需要设置代理,并且实现findVideo方法。
你还没有登录,请先登录或注册慕课网帐号
10861人关注
Copyright (C) 2018 imooc.com All Rights Reserved | 京ICP备 号-11鍙?渶涓

我要回帖

更多关于 代理服务器的使用 的文章

 

随机推荐