質問

My project needs to switch between 2 different global tint values. How can I do this programmatically?

役に立ちましたか?

解決

Change the tint color of the UIWindow of the application. You can either use the [[UIApplication sharedApplication] keyWindow] but better is to use [[UIApplication sharedApplication] delegate].window.

他のヒント

UIAppearance is the answer! It sets property to all the objects of that class (and subclasses).

[[UIView appearance] setTintColor:(UIColor *)]

You can change the backgroudColor of all the buttons too

[[UIButton appearance] setBackgroundColor:(UIColor *)]
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top