Change global tint color - iOS7/iOS8

后端 未结 7 2018
暖寄归人
暖寄归人 2020-12-23 15:40

How can we change the global tint color on iOS7/iOS8 by code? I want to change multiple objects that use this property, but not change each one, that\'s why

7条回答
  •  南笙
    南笙 (楼主)
    2020-12-23 16:42

    You can specify a tint color for the entire app by setting the window’s tint property. To do this, you could use code similar to the following:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        self.window.tintColor = [UIColor purpleColor];
        return YES;
    }
    

提交回复
热议问题