码迷,mamicode.com
首页 > 移动开发 > 详细

iOS Assigning to 'id<XXXDelegate>' from incompatible type 'BViewController *__strong'

时间:2015-12-01 12:51:26      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:

在使用代理的时候,

    BViewController *BVC = [[BViewController alloc]init];
    self.delegate = BVC;

 出现这样的警告Assigning to ‘id<XXXDelegate>‘ from incompatible type ‘BViewController *__strong‘

解决方案:

#import "BViewController.h"

@interface BViewController ()<XXXDelegate>

@end

 在BViewController.h中 添加:XXXDelegate 即可

 

iOS Assigning to 'id<XXXDelegate>' from incompatible type 'BViewController *__strong'

标签:

原文地址:http://www.cnblogs.com/jukaiit/p/5009688.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!