I set an images for button\'s states Normal,Highlighted and Selected, but when the button in selected state and I press/highlight it I didn\'t see my highlighted image but j
Swift 3+
button.setImage(UIImage(named: "selected_image"), for: [.selected, .highlighted])
OR
button.setImage(UIImage(named: "selected_image"), for: UIControlState.selected.union(.highlighted))
It means that the button current in selected state, then you touch it, show the highlight state.
selected
highlight