i am trying to create a scrollable segment control, more precisely i need a segment control that has 5-10 or more choices/buttons but because there will be no space for all that buttons i need it to be scrollable, i need to make the segment control itself to be scrollable. so far i have not see any tutorial for this in swift language or obj c.

i have tried to put segment control inside a view inside a scrollable view. i then change the width of both VIEW and Scrollable view into 1000. it is scrollable but only a little to the left and little to the right and the button width become very small. i have also try to change the width
segmentcontrol.frame.size.width = 100 but it does not make any change. what did i miss??
this is the result
Did you set the width on the contentSize property of the scrollview? Thats how it knows how much to scroll.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With