iOS Assigning to 'id' from incompatible type 'BViewController *__strong'

时间:2022-09-04 21:06:50

在使用代理的时候,

    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'的更多相关文章

  1. 警告:Assigning to &&num;39&semi;id&lt&semi;Delegate&gt&semi;&&num;39&semi; from incompatible type &&num;39&semi;ViewController &ast;const&lowbar;st

    原因: 你自己写了代理,设置了   delegate = self.但是self 没有遵守这个协议 只需要遵守这个协议就可以消除警告.

  2. Assigning to &&num;39&semi;id&lt&semi;UINavigationControllerDelegate&comma;UIImagePickerControllerDelegate&gt&semi; &lowbar;Nullable&&num;39&semi; from incompatible type &&num;39&semi;InfchangeVC &ast;const &lowbar;&lowbar;strong&&num;39&semi;

    出现 Assigning to 'id<UINavigationControllerDelegate,UIImagePickerControllerDelegate>' from inco ...

  3. Xcode工程编译错误之iOS开发之Sending &&num;39&semi;&lowbar;&lowbar;strong typeof &lpar;xxx&rpar;&&num;39&semi; &lpar;aka &&num;39&semi;xxxx &ast;&lowbar;&lowbar;strong&&num;39&semi;&rpar; to parameter of incompatible type &&num;39&semi;id&lt&semi;xxx&gt&semi;&&num;39&semi;

    iphone开发出现警告: Sending '__strong typeof (xxx)' (aka 'xxxx *__strong') to parameter of incompatible ty ...

  4. assigning to uiimagepickercontrollerdelegate from incompatible type

    I have added a UIImagePickerController to a UIViewController. I have assigned the UIImagePickerContr ...

  5. Sending &&num;39&semi;ccColor4B&&num;39&semi; &lpar;aka &&num;39&semi;struct&lowbar;ccColor4B&&num;39&semi;&rpar; to parameter of incompatible type

    今天遇到了如下的一个错误, Sending 'ccColor4B' (aka 'struct_ccColor4B') to parameter of incompatible type CiColor ...

  6. TypeMismatchException&colon; Provided id of the wrong type for class zhongfucheng&period;user&period;entity&period;User&period;

    今天在使用SSH框架做项目的时候出现了这个错误,找了我非常非常多的时间!!!!!!! Struts Problem Report Struts has detected an unhandled ex ...

  7. Provided id of the wrong type for class pojo&period;Books&period; Expected&colon; class java&period;lang&period;Integer&comma; got class java&period;lang&period;Long

    log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment). log4j:WARN Please ...

  8. ionic获取ios唯一设备id的解决方案

    经常有朋友来问这个问题. 每次都去解释这个问题也浪费不少时间, 所以还是开一篇文章, 把这个问题说清楚吧. 先纠正一个误区吧: 有同学可以通过ionic natvie的device插件获取. 我们在文 ...

  9. JSP页面使用EL表达式出现的问题:javax&period;el&period;PropertyNotFoundException&colon; Property &&num;39&semi;ID&&num;39&semi; not found on type java&period;lang&period;Str

    问题描述: 1. 后台返回到JSP前台的的list,在jsp页面使用EL表达式遍历时出现如下问题:javax.el.PropertyNotFoundException: Property 'ID' n ...

随机推荐

  1. mysql 编译安装

    mysql 编译安装方式:   ```cd /home/oldboy/tools```                创建 目录          if not have   then     mkd ...

  2. nova instance出错:&quot&semi;message&quot&semi;&colon; &quot&semi;Proxy error&colon; 502 Read from server failed

    执行 $ nova resize instance1 时候出错: {, "details": " File \"/opt/stack/nova/nova/com ...

  3. myeclipse2014新建maven项目

    1,首先安装maven,并配置. 2,新建maven project. 3,选择maven-archetype-webapp. 4,填写afrifact ID即为项目名称. 5,finish后 bui ...

  4. Codefroces 750C:New Year and Rating(思维)

    http://codeforces.com/contest/750/problem/C 题意:有n场比赛,每场比赛有一个c,代表比赛结束后分数的增长情况,有一个d,代表这场比赛在div1或者div2打 ...

  5. zabbix登陆问题:cannot allocate shared memory for collector

    问题说明:在一台zabbix被监控服务器上(64位centos6.8系统,64G内容)启动zabbix_agent,发现进程无法启动,10050端口没有起来! 启动zabbix_agent进程没有报错 ...

  6. su&colon; cannot set user id&colon; Resource temporarily unavailable

    今天R&D所在主机出现su: cannot set user id: Resource temporarily unavailable资源不可用报错,直接通过其他机器ssh huyuh@xxx ...

  7. How do I connect to a local elevation server&quest;

    How do I connect to a local elevation server? brett Reply | Threaded | More     Mar 18, 2009; 10:02p ...

  8. eclipse中git解决冲突

    摘录自http://blog.csdn.net/rosten/article/details/17068285 1. 工程->Team->同步 2.从远程pull至本地,就会出现如下内容 ...

  9. Java集合排序方法comparable和comparator的总结

    一.概述Comparable和Comparator都是用来实现集合中元素的比较.排序的.Comparable是在集合内部定义的方法实现的排序,位于java.lang下.Comparator是在集合外部 ...

  10. OpenGL ES 渲染立体图形

    一.理解 顶点数据存储在申请的缓冲区中,其由数据总线传递给着色器(如果是片元着色器,还须将顶点转换成片元),再由着色器最终渲染到涂层上: 二.思路 1.设置涂层: 2.创建上下文: 3.清空缓存区: ...