Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SegmentedControlStyle deprecated in iOS 7 and later (8.4) | Xcode 6.4

I got this problem the other day. I'm new at Xcode, and I had the task of upgrade the code used for an app in iOS 6.1 to 8.4, but there are so many deprecated methods. I solved most of them, but I just simply can't find how to solve these ones, or for what code I can change them... Does anyone has an idea?

Thank you so much!!

Both, the "segmentedControlStyle" and the "UISegmentedControlStyleBar" are deprecated.

This is the line causing me problems.

showControl.segmentedControlStyle = UISegmentedControlStyleBar;

like image 993
Erick Rosas Avatar asked Oct 20 '22 03:10

Erick Rosas


1 Answers

The segmentedControlStyle property has been deprecated because in iOS 7 it has no effect.

Instances of a UISegmentedControl now only have one style, so you can remove that line entirely. If your appearance is undesirable, you'll need to tweak further to achieve the intended look.

like image 179
Craig Otis Avatar answered Oct 21 '22 19:10

Craig Otis