I am trying to set a state for UIButton.
But i don't know the difference between the
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.