views:

382

answers:

1

I have a UIButton which I've added in IB, however the view behind this button changes color and I need to switch the button's type between InfoDark and InfoLight. Bizarrely though, buttonType property is read only. So how can i switch between light and dark info buttons?

+1  A: 

There's no way to change the .buttonType once it's set.

You can prepare two buttons, and hide one of them depending on the background color.

KennyTM
well apparently theres a private setter method, by why something like that is private who knows. Thanks for you idea about 2 buttons, that's what I'll do.
Jonathan
@Jon: It's private because setting this will *not* convert a dark info button to a light one.
KennyTM