I'm trying to create a rather custom segmentControl. What is the easiest way to create such below. with just text and a border line the selected?
-
use custom **UIButton**, in this place of **SegmentControl** – Anbu.Karthik Aug 29 '15 at 12:55
-
so just make 4 uibuttons? – Peter Pik Aug 29 '15 at 13:01
3 Answers
Choice -1
ya just created 4 buttons and create the one common method , inside the method assign the tag for each button for identify which button is selected , on that selected button change the TextColor
and use use Underline,else button are another color
Choice -2
ya just created 4 buttons and create the one common method , inside the method assign the tag for each button for identify which button is selected , on that selected button change the Image
in UIControlStateNormal
else no selection Button use normal Text or another Image

- 1
- 1

- 82,064
- 23
- 174
- 143
You can create buttons and give tag to each of them,which will identify which button has been selected.Whenever a button is marked as selected change the state to .selected with its image.

- 137
- 10
You can make fastens and offer tag to each of them,which will recognize which catch has been selected. Whenever a catch is set apart as chosen change the state to .selected with its image.

- 391
- 4
- 9