Search code examples
iosswiftuibuttonibaction

Program UIButton on swift


i have created a button on main.storyboard and i can add IBAction too. But, my aim is to make a sticky button(after you clicked once it is stayed pressed until you click it again) can somebody suggest please.


Solution

  • Set Image in selected state of uiButton, means you need two image one for unselected and another for selected