Forcing Interface Builder to change class of objects(UIButton->UIControl) -


I have a UIView that is full of buttons which are well-accustomed to all actions and outlets. However, in my eternal knowledge, I have decided that I would actually separate the button behavior and UIControl subclassed it.

My plan was to hop in the builder builder, the new UIControl subclass changing the button of my class, and then up and running it will preserve all outlets and action connections.

When I write in the area of ​​class in my UIContol sub-class, look at the IB (see Identity Inspector), when I press out, then it takes the UIButton back to a UIButton subclass Works but I do not have a UIControl, I can go down the legacy tree, but no.

The first scheme was to go to XCode and change the UIButton temporarily to its new control, to change the 'class' of my IB buttons, and then change the XCode code back to Supercompatible UIControl. IB accepted and changed the class, but running the app, I see a non-visible button. IB features inspector still shows it as a button.

To control the scratches and rewinding work, but I was hoping that if it can be avoided then not all buttons should be removed again. << / P>

Anyone know about this anyway?

Many thanks!

I am a year old on this, but it may help someone in the future. Perhaps you can open .xib in a text editor and understand what text you have to change to work on it (first see it on a sample project), then find and replace to fix everything at once Please. / P>


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -