I can not put the button as setEnable: NO

0

I have an interface with a button that shows an image when it is active and another when it is deactivated.

When I start the view, the button always appears as activated, although in the viewDidLoad I do a [self.button setEnabled: NO]

If at one point in the application I launch an event and do a [self.button setEnabled: NO] the button if it is disabled

What do I have to do so that at the beginning I get the button as disabled by code?

    
asked by Popularfan 05.01.2017 в 14:55
source

2 answers

3

Test:

[button setEnabled: NO];

and

[button setUserInteractionEnabled: NO]

    
answered by 05.01.2017 / 17:18
source
1

You could do it graphically by selecting the button and in the attributes panel

Use this in case you need the button to be seen as unoccupied

Use this in case you need to continue seeing the same button but the user can not take any action on the

    
answered by 06.01.2017 в 22:27