IB_DESIGNABLE, IBInspectable — Interface builder does not update

Based on chrisco’s suggestion to debug the selected view (which I had already done, but went to try again for good measure), I noticed a couple of other options at the bottom of the Editor menu.

  • Automatically Refresh Views
  • Refresh All Views

I clicked “Refresh All Views” and after Xcode had a bit of a think, suddenly the storyboard was displaying my view as expected (properly applying my IBInspectable properties).

enter image description here

I then went through the whole process again to confirm that this is the solution.

I created a new class, ThirdView. This class is identical to the others, again. I changed my view’s class to ThirdView and got something slightly different this time:

enter image description here

Clicking “Show” to me to the warnings:

enter image description here

A new one this time:

Using class UIView for object with custom class because the class ThirdView does not exist.

This isn’t really any more helpful than what already existed. Plus, now the other three warnings have doubled into 6 strangely.

Anyway, if I click “Refresh All Views” from the Editor drop down menu again, all the errors go away, and once again, the view properly displays.

Still, up to this point, everything I did was stuff I never messed with at home. At home, it just worked. So I turned on “Automatically Refresh Views” and created a “FourthView” to test–once again, identical to the first three.

After changing the view’s class to “FourthView” the designables label said “Updating” for a short moment then finally said “Up to date”:

enter image description here

So, I checked my computer at home. “Automatically Refresh Views” is turned on at the computer that was always working. It was turned off at the computer that wasn’t. I don’t ever remember touching this menu option. I can’t even tell you for sure whether it existed before Xcode 6. But this option is what was making the difference.


TL;DR, if you’re having the same problem described in the question, make sure “Automatically Refresh Views” is turned on (or manually “Refresh All Views” when you need an update in IB):

enter image description here

Leave a Comment