我有一个iPhone应用程序,我的主题有一些自定义颜色.由于这些颜色将为我的UI修复,我想定义要包含的类中的颜色(Constants.h和Constants.m).我怎么做?(简单地定义它们不起作用,因为UIColors是可变的,并且会导致错误 - Initalizer不是恒定的).
/* Constants.h */
extern UIColor *test;
/* Constants.m */
UIColor *test = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0];
Run Code Online (Sandbox Code Playgroud)
谢谢!