出现 Assigning to 'id<UINavigationControllerDelegate,UIImagePickerControllerDelegate>' from incompatible type 'ManageMessageViewController' 警告 当调用UIImagePickerController时,在进行委托定义是提示Assigning to 'id<UINavigationControllerDelegate,UIImagePickerContro…
该警告提示信息,是说,设置了代理对象,但是并没有继承它的代理.下图中,可以看出,警告信息提示我们没有继承“CALayerDelegate”的代理. 解决方法,很简单,(在 @interface 文件中继承它的代理即可)如下: 重新编译一下就可以了.…
I have added a UIImagePickerController to a UIViewController. I have assigned the UIImagePickerControllerDelegate to that UIViewController. When I try to do myPicker.delegate = self; Xcode gifts me with this message: warning: assigning to id from inc…
在使用代理的时候, BViewController *BVC = [[BViewController alloc]init]; self.delegate = BVC; 出现这样的警告Assigning to 'id<XXXDelegate>' from incompatible type 'BViewController *__strong' 解决方案: #import "BViewController.h" @interface BViewController ()&l…
iphone开发出现警告: Sending '__strong typeof (xxx)' (aka 'xxxx *__strong') to parameter of incompatible type 'id<xxx>' 如图: 原因是没有在头文件实现相应协议. 解决方法是在头文件(.h文件)中 @interface 一行后面加上 <协议名> 如图:…
今天遇到了如下的一个错误, Sending 'ccColor4B' (aka 'struct_ccColor4B') to parameter of incompatible type CiColor 网上搜寻解决方案如下,就是要强制设置下类型. 按如下改变: + (id) layerWithColor:(ccColor4B)color {     return [[(CCColorLayer*)[self alloc] initWithColor:color] autorelease];   …
tip:参考 http://stackoverflow.com/questions/9861538/assigning-to-iddelegate-from-incompatible-type-viewcontroller-const-strong 我的问题的解决:UIGestureRecognizerDelegate忘记添加协议 @interface:XXXX()<UIGestureRecognizerDelegate>…
原因: 你自己写了代理,设置了   delegate = self.但是self 没有遵守这个协议 只需要遵守这个协议就可以消除警告.…
实例变量在类方法中被使用 原因:静态方法访问了非静态变量属性(.h中声明的那些属性),就是类方法访问了成员变量…
编译报警告 可能是 自定义分类使用协议时出现与父类协议的冲突 解决方法如下:    …