PDA

View Full Version : error with creating UIViewController




knut
Jul 2, 2009, 04:24 PM
Hi All
I want create textEditor with rotate text mode.
what I do my steps.
1.Drag and drop form library UINavigationController
2.Add two objects in tree in UIViewController View and TextView
3.Create new object (class) Write ->class file txtEditViewController
4.In Identity Inspector property of UIViewController change the class name from UIViewController to txtEditViewController. and add varable UINavigationController *navController in "class Outlets"
5.In txtEditViewController.h set the parent class UIViewController.
6.txtEditAppDelegate

#import "txtEditAppDelegate.h"

@implementation txtEditAppDelegate

@synthesize window;
@synthesize navController;

— (void)applicationDidFinishLaunching:(UIApplication *)application {
[window addSubview:navController.view];

// Override point for customization after app launch
[window makeKeyAndVisible];
}

— (void)dealloc {
[navController release];
[window release];
[super dealloc];
}

@end

7.In txtEditaAppDelegate add the new member and set property
IBOutlet UINavigationController *navController ;
@property (nonatomic, retain) UINavigationController *navController ;
In IB I bound Object UIViewControllers navController var with UINavigationController.

after this steps I build application and when emulator is run I get such exeption

Exeption type: EXC_BREAKPOINT(SIGTRAP)
Application Specific information:
Terminationg app due to uncaught exeption 'NSUnknoewn Exeption' reasion
txtEditViewController 0x274dc60


what I done incorrect ?
Thanks