I am using XCode 4.
In My application simple View Based Application.
I have no UINavigation controller allocated.
But I just want to use default property of UINAvigation controller.
I have done in
- (void)viewDidLoad
{
[self.navigationController setNavigationBarHidden:NO animated:YES];
// self.navigationItem.rightBarButtonItem=self.bbiAdd;
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
}
But I can not see the result ... I have done with inte开发者_开发知识库rface builder with this code....
You can't use the self.navigationController
if you don't have an UINavigationController
.
All you can do is add an UINavigationBar
to your UIViewController
.
Just Drag and Drop a UINavigationBar in your XIB, set the Title (if you want) for it and you are good to go.
精彩评论