首页 > 其他 > 详细

ARC forbids Objective-C objects in structs or unions

时间:2017-07-22 17:35:46      阅读:292      评论:0      收藏:0      [点我收藏+]
解决方法有二种:
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

原文:http://www.cnblogs.com/cxchanpin/p/7221784.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!