I want to load my UINavController
from my UIViewController
. My interface details is here.
@interface ContactUs : UIViewController {
IBOutlet UIWindow *window;
IBOutlet UINavigationController *navController;
}
@property (nonatomic,retain) IBOutlet UINavigationController *navController;
@end
and in implementation ..
@synthesize window;
@synthesize navController;
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
-(void)viewDidLoad {
[window addSubview:navController.view];
[window开发者_StackOverflow社区 makeKeyAndVisible];
[super viewDidLoad];
NSLog(@":::::::::::::::::::");
}
But unfortunate my UINavigationController
is not loading. I am seeing a blank windows is appearing.
@interface ContactUs : UINavigationViewController {
IBOutlet UIWindow *window;
IBOutlet UITextView *textView;
IBOutlet UIButton *button;
}
// Add properties to the all outlets //
-(IBAction) buttonpressed: (id) sender;
And in the implementation - write the code for buttonpressed and you can make use that for whatever your goals are.
If you want to use the Navigation View controller over the View controller .. Why not use the UINavigationController ?
@interface ContactUs : UINavigationViewController {
IBOutlet UIWindow *window;
// IBOutlet UINavigationController *navController; // You do not need this.
}
精彩评论