首页 > 代码库 > ARC forbids Objective-C objects in structs or unions
ARC forbids Objective-C objects in structs or unions
解决方法有二种:
1。在出错的地方加入
__unsafe_unretained
2。关闭系统ARC。1.点击project 2.点击Build Setting 3.找到其以下的Objetive-C Automatic Reference Counting 改后面的YES为NO 即可了
转载:http://linuxp.blog.163.com/blog/static/17096277201261311949260/
typedef struct OFBragDelegateStrings
{
NSString* prepopulatedText;
NSString* originalMessage;
} OFBragDelegateStrings;
to
typedef struct OFBragDelegateStrings
{
__unsafe_unretained NSString* prepopulatedText;
__unsafe_unretained NSString* originalMessage;
} OFBragDelegateStrings;
參考:http://stackoverflow.com/questions/8093099/arc-forbids-objective-c-objects-in-structs-or-unions-despite-marking-the-file-f
ARC forbids Objective-C objects in structs or unions
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。