UISegmentedControl square corners

Is there any solution to do UIsegmentedControl

with square corner programming? Please, help!!!

+3


source to share


2 answers


use this open source control. it will work great for you. https://github.com/oettam/MCSegmentedControl



+2


source


You can set background images for segments that completely overlap the border. If your background images are square, your segmented control will appear square. Use the following code for each segment state you want to bite.



[segmentedControl setBackgroundImage:[UIImage imageNamed:@"square-background-image-selected"] forState:UIControlStateSelected barMetrics:UIBarMetricsDefault];

+3


source







All Articles