문제

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