- 在AppDelegate.h文件中声明一个全局变量:
@property UIColor *zhuTiColor; - 在AppDelegate.m中,添加:@synthesize zhuTiColor;
- 然后在
- (BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions 中添加:
zhuTiColor=[UIColor colorWithRed:0x00/255.0 green:0xb2/255.0 blue:0xee/255.0 alpha:1]; - 在需要使用的地方:
bt.backgroundColor=delegate.zhuTiColor;
iOS设置主题颜色方便使用
最新推荐文章于 2024-07-10 20:24:11 发布