I used Apple's template to make a MainWindow.xib file with a TarBar at the bottom. I then made 2 more views, FirstView.xib and AboutView.xib. I also made two copies of view controllers, FirstViewController.h/m and AboutViewController.h/m. Then I set AboutView.xib's class identity to AboutViewController and set FirstView.xib's class identity to FirstViewController Then I assigned each tab to a nib. The first tab's view is loaded from FirstView.xib and the second tab's view is loaded from AboutView.xib.
I then added a label to AboutView.xib. Made a referencing outlet to a IBOutlet (UILabel*) called dayLabel. When I run the program and try to switch to the AboutView tab, the gdb reports a crash.
However, if I remove the referencing outlet for the label (and change nothing else) I can switch to the AboutView and it all works fine. This would be great and all, except I can't modify the label or do anything with it since I don't have a referencing outlet to it.
Anyone have any idea where I screwed up or how to fix this?
I then added a label to AboutView.xib. Made a referencing outlet to a IBOutlet (UILabel*) called dayLabel. When I run the program and try to switch to the AboutView tab, the gdb reports a crash.
Code:
[Session started at 2009-02-01 00:23:26 -0500.]
2009-02-01 00:23:29.778 Marathon[8761:20b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x523c90> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key dayLabel.'
2009-02-01 00:23:29.782 Marathon[8761:20b] Stack: (
2496831755,
2488671803,
2496830513,
2523021960,
2523020526,
2523563969,
818019035,
2496785477,
818013737,
818022028,
816607014,
816608011,
816608381,
816649675,
816645441,
816115430,
818036263,
816115430,
816516406,
816517630,
816516519,
816115430,
816516406,
816517630,
816514372,
816216343,
816148479,
816144864,
827743722,
827753484,
2496333301,
2496335064,
827745792,
827745989,
816114848,
816160924,
9736,
9590
)
[Session started at 2009-02-01 00:23:29 -0500.]
Loading program into debugger
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".warning: Unable to read symbols for "/System/Library/Frameworks/UIKit.framework/UIKit" (file not found).
warning: Unable to read symbols from "UIKit" (not yet mapped into memory).
warning: Unable to read symbols for "/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics" (file not found).
warning: Unable to read symbols from "CoreGraphics" (not yet mapped into memory).
Program loaded.
sharedlibrary apply-load-rules all
Attaching to program: `/Users/Tyler/Library/Application Support/iPhone Simulator/User/Applications/A0F78B38-2BEA-4A4A-A5B7-8D1AB711409E/Marathon.app/Marathon', process 8761.
However, if I remove the referencing outlet for the label (and change nothing else) I can switch to the AboutView and it all works fine. This would be great and all, except I can't modify the label or do anything with it since I don't have a referencing outlet to it.
Anyone have any idea where I screwed up or how to fix this?