Initalizing 'AppDelegate * __strong' with an expression of incompatible type ''id<UIApplicatioinDele
来源:互联网 发布:免费下载我的淘宝 编辑:程序博客网 时间:2024/05/05 07:52
使用ARC时,获取全局的AppDelegate会有上面的警告。
修改前:
AppDelegate *app = [UIApplication sharedApplication].delegate;
修改后:即(强制转换)
AppDelegate *app = (AppDelegate*)[UIApplication sharedApplication].delegate;
0 0
- Initalizing 'AppDelegate * __strong' with an expression of incompatible type ''id<UIApplicatioinDele
- Initalizing 'AppDelegate * __strong' with an expression of incompatible type ''id<UIApplicatioinDele
- 警告:Initalizing 'AppDelegate * __strong' with an expression of incompatible type ''id<UIApplication..
- Initializing 'AppDelegate *__strong' with an expression of incompatible type
- Initializing 'AppDelegate *__strong' with an expression of incompatible type 'id<UIApplicationDelega
- Initializing 'Object' *__strong' with an expression of incompatible type 'id <Object> _Nullable
- Sending 'AppDelegate *const __strong' to parameter of incompatible type 'id<******Delegate>'
- AppDelegate警告 Initalizing 'AppDelegate * __strong'
- Sending 'ViewController *const __strong' to parameter of incompatible type 'id<***Delegate>'
- Sending 'ViewController *const __strong' to parameter of incompatible type 'id<***Delegate>'
- Sending 'xxx *const __strong' to parameter of incompatible type 'id<aDelegate>'
- Assigning to ‘id<UIWebViewDelegate>’ from incompatible type 'xxxViewController *const __strong'
- Assigning to 'id<xxxxDelegate>' from incompatible type 'xxxxViewController *const __strong'
- Assigning to 'AppDelegate *' from incompatible type 'id<UIApplicationDelegate>'
- Assigning to ‘APPDelegate’ from incompatible type ‘id<UIApplicationDelegate> _Nullable’
- 警告⚠️Assigning to 'id<LoginViewDelegate>' from incompatible type 'LoginViewController *__strong'
- Sending 'NSProgress *__strong *' to parameter of incompatible type 'void (^ _Nullable)(NSProgress *
- Sending 'ViewController' to Parameter of Incompatible Type 'id<xxxDelegate>'
- 回味经典——uboot1.1.6 之 第一阶段
- sql语句将某一列的值查询成,逗号分隔的字符串
- 通过CStdioFile读写unicode字符串
- 利用backtrace解决程序coredump
- hbernate中的criteria
- Initalizing 'AppDelegate * __strong' with an expression of incompatible type ''id<UIApplicatioinDele
- diffie-hellman-group1-sha1
- 前段优化之雅虎的34条军规
- nodejs封装的mysql链接数据库
- 回味经典——uboot1.1.6 之 第二阶段 第三阶段
- Java核心内库-线程-理解进程和线程
- iOS提交后申请加急审核
- Spark Cluster与Application中的重要概念以及如何提交应用spark-submit
- Nurbs曲线详解