I am new working with Objective C, I have good knowledge with storyboards but now I try to change the root view controller of a UINavigationController by code, it happens that it depends on a variable, I will set the root, but I don't know how to configure this action besides what I have my custom class for my UINavigationControllers. I hope you can help me.Keep in mind that this view is the 3rd screen in the app.
@interface PCCatalogNavigationController () <UINavigationControllerDelegate>
@end
@implementation PCCatalogNavigationController
- (void)viewDidLoad{
if (status == 1){
//TableViewViewController
} else {
//Optional StarViewController
}
}
@end
inside Your App delegate just add Property of you Navigation Controller
and Inside
instead UINavigationController you can use you customNavigationcontroller