Reputation: 11193
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?
Upvotes: 1
Views: 92
Reputation: 419
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.
Upvotes: 0
Reputation: 137
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.
Upvotes: 0
Reputation: 82759
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
Upvotes: 0