Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What should I use instead of the deprecated UISegmentedControlStyleBezeled in iOS5.1?

Tags:

ios

There are warnings when I build my app indicating my UISegmentedControlStyleBezeled is deprecated. There are no other types of UISegmentedControl that looks close to the Bezeled one so I don't know what I can use instead of it. I need something like UISegmentedControlStyleBar but with more height.

Moreover, looking in UISegmentedControl.h reveals this...

typedef enum {
    UISegmentedControlStylePlain,     // large plain
    UISegmentedControlStyleBordered,  // large bordered
    UISegmentedControlStyleBar,       // small button/nav bar style. tintable
    UISegmentedControlStyleBezeled,   // DEPRECATED. Do not use this style.
} UISegmentedControlStyle;
like image 771
Hlung Avatar asked Mar 27 '12 05:03

Hlung


2 Answers

For the moment, the work around I use is using UISegmentedControlStyleBar and increase its frame height. You might also want to keep the same center as well to avoid it expanding down.

like image 120
Hlung Avatar answered Oct 15 '22 01:10

Hlung


I have a feeling the reason they deprecated it was because they accidentally broke it in 5.1.

I'm sure we will see it again in the future as people start moving off of 5.1.

like image 43
endy Avatar answered Oct 15 '22 00:10

endy