I disable a button with [myButton开发者_如何学编程 setEnabled: NO]
. Then, I try to enable it with [myButton setEnabled: YES]
. And nothing happens. Do I forgot something?
Check out your interface builder, maybe forgot to hook up your button to the outlet..
The code you are describing to enable the button is correct. The next thing to check would be if that code is actually getting called, or if, for some reason, the code never reaches that line.
精彩评论