您的位置:首页 > 移动开发

Initalizing 'AppDelegate * __strong' with an expression of incompatible type ''id<UIApplicatioinDele

2016-11-23 09:06 931 查看
使用ARC时,获取全局的AppDelegate会有上面的警告。
修改前:

AppDelegate *app = [UIApplication sharedApplication].delegate;
修改后:即(强制转换)

AppDelegate *app = (AppDelegate*)[UIApplication sharedApplication].delegate;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐