Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why won't new class show up in Identity Inspector/Custom Class in Interface Builder?

I'm having a repeating problem in Xcode 4.5 and would like to ask for help/advice.

Have been creating a new class, BIDSwitchViewController, which is a subclass of UIViewController. When I go to the Identity Inspector to layout the .xib file, of course I want to change the class it belongs to to BIDSwitchViewController, so that I can layout my objects and make my connections.

But BIDSwitchViewController doesn't show up in the dropdown list for Custom Class in Identity Inspector. So then I hardcode "BIDSwitchViewController" into the text box, but then that doesn't stick.

What am I doing wrong,and what can I do to fix this?

Thanks in advance.

like image 505
pdenlinger Avatar asked Dec 10 '12 21:12

pdenlinger


2 Answers

My way to solve this problem is to restart my Xcode! Then all works fine. Just have a try!

like image 62
sunkehappy Avatar answered Dec 30 '22 09:12

sunkehappy


If restarting doesn't fix it...

  1. Click on a different file
  2. then go back to your .Storyboard or .XIB.

...Or try and open up your .Storyboard or .XIB in a new tab. Basically you just want to force the IB to reload and re-render.

like image 39
Sakiboy Avatar answered Dec 30 '22 08:12

Sakiboy