今天做了一个单例的练习,创建继承于NSObject的视图控制器,在创建UIColor的时候出现以下错误
Property with 'retain (or strong)' attribute must be of object type
Unknown type name 'UIColor
此报错在导入#import <UIKit/UIKit.h>之后得以解决
本文介绍了一个关于UIColor导入引发的编程错误,并提供了导入UIKit/UIKit.h来解决问题的方法。
今天做了一个单例的练习,创建继承于NSObject的视图控制器,在创建UIColor的时候出现以下错误
Property with 'retain (or strong)' attribute must be of object type
Unknown type name 'UIColor
此报错在导入#import <UIKit/UIKit.h>之后得以解决

被折叠的 条评论
为什么被折叠?