title: create scrollable segment control (horizontally)
body: <p>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.</p>
  
  <p><a href="https://i.stack.imgur.com/DetHs.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DetHs.gif" alt="enter image description here"></a></p>
  
  <p>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 
  <code>segmentcontrol.frame.size.width = 100</code> but it does not make any change. what did i miss??</p>
  
  <p>this is the result<a href="https://i.stack.imgur.com/zXa43.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zXa43.png" alt="enter image description here"></a></p>