:
- UINavigationController
viewDidLoad viewWillLoad , root .- NavigationController subview viewCntroller view ( self.contentView)
BOOM!!
.
- (void)viewDidLoad
{
[super viewDidLoad];
[self.contentView setFrame:CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height)];
mNavController =[[UINavigationController alloc]initWithRootViewController:myNestedRootController]; /
[self.mNavController.view setFrame:CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height)];
[self.mNavController setNavigationBarHidden:YES];
[self.contentView addSubview:self.mNavController.view];
}
Actually you can skip ContentView and have a view mNavController'sdirectly on viewcontroller view(my bad)
I have a way to click (just click) a new VC
-(void)moveToContentViewController:(PM_BaseContentVC *)contentvc animated:(BOOL)animated{
[self.mNavController popToRootViewControllerAnimated:NO];
[self.mNavController pushViewController:contentvc animated:YES];
[self.contentView addSubview:self.mNavController.view];
}
sugestions and optimization are welcome :)
source
share