How to set UISwitch border color?

后端 未结 3 1109
星月不相逢
星月不相逢 2021-02-19 09:11

My app has:

[[UIView appearance] setTintColor:[UIColor whiteColor]];

And here is what I have when on:

and off

3条回答
  •  隐瞒了意图╮
    2021-02-19 09:44

    Will you please try adding this line to your AppDelegate's didFinishLaunchingWithOptions

    [[UISwitch appearance] setTintColor:[UIColor grayColor]];
    

    This should apply the chosen Tint color on all your UISwitch controls.

提交回复
热议问题