Advertise here

Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Unknown Class in Interface Builder file

RobynRobyn Posts: 162Registered Users
edited April 2010 in iOS SDK Development
I created a class when I first created my project, and I had lots of views in Interface Builder that were set to that class type.

Later I decided to get rid of that class. I deleted the class files in X-code, deleted all references to them in the code, deleted them from the project folder in the Finder, changed the class of each object in IB to 'ImageView' instead.

I cleaned all the targets in X-code, I've reloaded all the class files in IB, and I've re-compiled the project again.

And STILL, I get this message in the debugger:
Unknown class CardView in Interface Builder file.

There's nothing not working about it, nowhere that it's expecting that class in the project (I've done a 'find in project' trying to fit a setting for it, but it's not there). It doesn't come up in IB when I go to the drop down list of classes, like if I were trying to change the class of an object.

So where is it?? How can I get rid of it once and for all?

(The only little clue I have, is that when I changed the class type in IB back to Imageview, instead of my own class (which was a subclass of UIControl), the Inspector panel didn't look quite like a normal Image View one - there was no drop down box to set the image, for example, and the icons in the window where all the objects are listed are still the ordinary ones, not the picture-icon that normally comes up for ImageViews. So perhaps it is still somehow thinking that it's this old class. But I load images to it fine in the code, and it functions fine as an ImageView, and it all seems to work properly, apart from the fact that I get this message every time.)

Any ideas? Thanks.
Post edited by Robyn on
<b>Times Table Clock: </b><font color="Teal">BEAT THE JOKERS! </font> - a fun, addictive game of clock solitaire that effortlessly teaches times tables as you play.<br />
<br />
[SIGPIC][/SIGPIC] <br />
<br />
<a href="";


  • DanSeligDanSelig Posts: 19Registered Users
    edited April 2010
    Robyn, did you resolve this? I'm having the same problem. A project that used to run now won't run and it's looking for a class I don't refer to.

    I found a fix for my problem. I reset the simulator and then cleaned the build.
  • RobynRobyn Posts: 162Registered Users
    edited April 2010
    Yes, I did sort-of find a solution.

    Cleaning and re-building didn't seem to be enough for me.

    Here's another thread that I mentioned the problem in:

    And this was what I'd posted. I'm still not sure whether it's a suitable solution or not, but it seems to have worked!

    Join Date: Nov 2009
    Posts: 51

    I think, maybe, I've possibly solved this - but I don't know if it's a good solution or something that will cause me problems.

    After searching and searching and searching, I finally discovered the name of this deleted class hidden in a file. I had to open the interface builder files in X-code, by right clicking on them and choosing 'view as source code'. Then searching for it came up with

    <object class="NSMutableArray" key="dict.values">
    <bool key="EncodedWithXMLCoder">YES</bool>
    <string> gin</string>
    <string>*this was the class name*</string>

    I tried just deleting those two lines (there were zillions more that looked just the same, but with all the other class names), but then it complained that the dictionary didn't have the right number of keys, and I couldn't figure out where the number of keys in the dictionary was defined.

    So I just deleted the class name from that line, and left it blank.


    Now my error is gone from the debugging console.
    But have I deleted something that I will need, or will I have created future problems by doing this?? Is there a better way, now that I have finally found the reference to the file? "
    <b>Times Table Clock: </b><font color="Teal">BEAT THE JOKERS! </font> - a fun, addictive game of clock solitaire that effortlessly teaches times tables as you play.<br />
    <br />
    [SIGPIC][/SIGPIC] <br />
    <br />
    <a href="";
Sign In or Register to comment.