views:

246

answers:

4

Hi,

I've renamed a UITableViewController class in Xcode, which was used as a parent class in a XIB. The Interface Builder still uses the old name for that class and it compiles and works fine. Interface Builder doesn't see the new name of the class and when I try to type in manually, it compiles and gives me an exception at the runtime: "Unknown class ... in Interface Builder file."

Is there a way to update the class name in the Interface Builder?

Thanks

A: 

Have you tried to select "File -> Reload All Class Files" in Interface Builder? Maybe that should work!

schaechtele
A: 

you can try...

  1. Clean and rebuild project
  2. delete XIB from project and create new one with new class
  3. delete class and XIB both from project (reference), copy them somewhere else and Add new file with XIB user interface in your project and copy everything from old class file to new class file...

One out of these three should work...

mihirpmehta
A: 

Hi, Jerve

Close your Interface Builder completely.

And Open that XIB from XCode.

Then it will display your renamed class.

yakub_moriss
A: 

I sometimes have problems with IB not noticing changes in class files.

What I do then is I drag the .h file from XCode to the window with .xib file inside of Interface Builder. That updates the class definition.

You can always reopen Interface Builder, but the above solution is quicker.

Merlin