my UISegmentedControl in the centre of navbar looks fine in all iOS versions except For IOS 9. I have looked at many discussions but I couldn't find a solution.
This happened at iOS 9
It should look like this
I added the segmented control this way:
listToggle = UISegmentedControl(items: [title1, title2])
self.navigationItem.titleView = listToggle
I also tried to use a UIView to wrap the toggle inside it and then show it, didn't work. making the segmented control smaller does not work neither.