0

I found IB_DESIGNABLE very useful and I am able to design anything with SubClassing and IB_DESIGNABLE but is it possible to use IB_DESIGNABLE same as we use in sub class with category ?

Varun Naharia
  • 5,318
  • 10
  • 50
  • 84
  • I believe you can only use IB_DESIGNABLE in custom views. So if you declare IB_DESIGNABLE in a category, you need to have a second custom class that extends UIView AND imports the header that has the category in order to be designable in IB. – Anton Banchev Sep 08 '15 at 09:44

1 Answers1

0

from the docs:

When you add the IB_DESIGNABLE attribute to the class declaration, class extension, or category for a custom view, Interface Builder renders your custom view on the canvas. When you make changes to your code, Interface Builder rebuilds your custom view and rerenders your custom view.

So it seems like you can

Fonix
  • 11,447
  • 3
  • 45
  • 74