Initalizing 'AppDelegate * __strong' with an expression of incompatible type ''id<UIApplicatioinDele
来源:互联网 发布:遂宁知秋凤凰婚庆 编辑:程序博客网 时间:2024/05/24 23:12
使用ARC时,获取全局的AppDelegate会有上面的警告。
修改前:
AppDelegate *app = [UIApplicationsharedApplication].delegate;
修改后:即(强制转换)
AppDelegate *app = (AppDelegate*)[UIApplicationsharedApplication].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>'
- Kinect深度图与摄像头RGB的标定与配准
- iOS 交互式动画
- IHEOS
- iOS Code Signing Troubleshooting
- Java读取src目录下的properties配置文件
- Initalizing 'AppDelegate * __strong' with an expression of incompatible type ''id<UIApplicatioinDele
- linux端口重用
- 设置了winform的背景图片随窗体的变化而变化
- 携一片阳光前行
- 笔记-编译器选项之预编译头
- 在控制台下显示进度
- 谈谈观察者模式
- VBScript使用window.open打开新窗口
- Objective-C代码规范