Weird behavior with UISegmentedControl and UIAppearance

有些话、适合烂在心里 提交于 2019-12-03 08:58:47

This is a bug with UISegmentedControl, I think. You can work around it by setting the selected segment after a delay, to allow the control time to draw itself. You don't even have to use an actual delay, just something like:

[self performSelector:@selector(setPreferences) withObject:nil afterDelay:0.0];

Where setPreferences updates the value of your segmented control.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!