Is there any solution to make UIsegmentedControl
with Square corner by programming?
Please help!!!
Asked
Active
Viewed 1,487 times
3
-
You may get your answer here :- http://stackoverflow.com/questions/7739173/uisegmentedcontrol-with-square-corners – Paresh Karnawat Feb 05 '13 at 05:16
2 Answers
3
You can set background images for the segments that will override the border entirely. If the background images are square, then your segmented control will appear square. Use the following code for each segment state you want to custumise.
[segmentedControl setBackgroundImage:[UIImage imageNamed:@"square-background-image-selected"]
forState:UIControlStateSelected
barMetrics:UIBarMetricsDefault];
2
use this open source control. it will work fine for you. https://github.com/oettam/MCSegmentedControl

sKhan
- 9,694
- 16
- 55
- 53

Muhammad Noman
- 128
- 6
-
Hi Muhammad Noman, Thanks for the link which you have provide, it has fixed my issue. – sKhan Feb 06 '13 at 08:19