Avoiding making a UIButton transparent/see-through when disabling it

Viewed 7311

I want to disable my UIButton, so I call:

button.enabled = FALSE;

However this makes the button see-through and I can see the elements underneath it. I don't mind that it changes colour, I just don't want it to be see-through.

I've tried ticking the boxes for 'opaque' and 'clip subviews' in IB, but no joy.

Is there an easy way to fix this? I suppose I could put a UIImageView with the same button image behind it, but it's hardly an elegant solution.

3 Answers
Related