Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

keep UIButton current state when it is disabled

Hi i am making a custom UIButton which have images for UIControlStateNormal and UIControlStateSelected. But when i set [myBtn setEnabled:No]; it changes back to UIControlStateNormal state instead of disabling at selected state. How can i keep the current state of button and disable it?

like image 597
Hassy Avatar asked Oct 31 '13 09:10

Hassy


1 Answers

Use userInteractionEnabled = NO instead of enable disable.

like image 89
Aditya Deshmane Avatar answered Oct 30 '22 07:10

Aditya Deshmane