Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between UIControlStateHighlighted and UIControlStateSelected?

I am trying to set a state for UIButton.

But i don't know the difference between the UIControlStateHighlighted and UIControlStateSelected.

Could anyone help me out?

Thanks and best regards.

like image 789
user1872249 Avatar asked Mar 01 '13 07:03

user1872249


1 Answers

They can mean whatever you want them to, but in general they mean the following:

Highlighted = The user is currently interacting with something that will change once they stop interacting (e.g. holding down a button)

Selected = The item is current the active item in a group (e.g. The selected item in a segmented control). This can only be achieved by setting it programmatically.

like image 135
borrrden Avatar answered Oct 01 '22 12:10

borrrden