That's what I'm doing:
1) Create a new subclass of UIViewController, mark with NIB for the interface designer
2) In the title:
@interface QuizMainViewController : UIViewController
{
UILabel* aLabel;
}
@property (nonatomic, retain) IBOutlet UILabel* aLabel;
@end
3) in .m
#import "QuizMainViewController.h"
@implementation QuizMainViewController
@synthesize aLabel;
- (void)dealloc
{
[aLabel release];
[super dealloc];
}
@end
4) Open the NIB In interface designer, drag the new UILabel to the view.
I am testing the program here and it works fine.
5) right-click the owner of the file, connect the 'aLabel' from Outlets to UILabel.
I run here and he falls. Message from the journal:
*** Application termination due to the uncaught exception "NSUnknownKeyException", reason: "[setValue: forUndefinedKey:]: this class is not a key value that is compatible with the encoding for the aLabel key. '