0
votes

In 8.3 Simulator I have UIViewController which contains a UISegmentedControl. The segmented control's appearance is managed by an appearance proxy. If I display this custom controller in a UIPopoverController, the segmented control's tint is ALWAYS white. Cant change it via proxy or directly. If I place the view controller in a regular modal, the segmented control's tint behaves how it should. All other segmented controls in the app obey the appearance proxy. It displays perfectly fine in iOS 8.2 Simulator. WTF?

Language = swift Xcode 6.3 targeting >= 8.1

2

2 Answers

1
votes

Tint adjustment mode is by default UIViewTintAdjustmentModeAutomatic, if you want to set specific tint colour, please make sure you have changed the tint adjustment mode to normal.

[[UISegmentedControl appearance] setTintAdjustmentMode:UIViewTintAdjustmentModeNormal];
0
votes

I'm pretty sure this is an 8.3 bug since it doesn't exist in 8.2. My solution is to change the application window's tintcolor before popping up the popover. For whatever reason, the segmented control doesn't inherit the correct tint, and cant be changed inside a popover