I have a custom button, and i need to disable it sometimes.
But when i disable it it changes the color and opacity, and it looks ugly.
Is there anyway to disable the button without changing the opacity?
I have a custom button, and i need to disable it sometimes.
But when i disable it it changes the color and opacity, and it looks ugly.
Is there anyway to disable the button without changing the opacity?
thanks
Go to interface builder. Click on your button, and go to the inspector for it. Click on the dropdown and have disabled state highlighted. Then you can change what it will look like when disabled
__________________ iEncourage - Premier Encouragement App for iPhone/iPod Touch iSleepWell- Premier Sleep Tracking App for iPhone/iPod Touch
(Tip: Use the same image.png you used for normal state)
Hope it helps!
__________________
“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” Anonymous
Just a tip... Apple recently rejected our Jam Packed! game for using disabled buttons in certain parts of the User Interface. They said disabled buttons confuse the users. We had to change the game to hide buttons that are not available at certain points instead of disabling them, and then we were able to get approval.
That made the code easier (didn't need a "disabled state", just set the .hidden attribute), but it did mean a slight layout change for us. Hiding buttons was leaving the interface unbalanced, so we actually changed the whole screen.