I new to iOS. Was developing on Android mostly. Currently took over an iOS app which I have to update with couple of features.
This app is TabBar based. Several navigation controllers are pushed into the tab bar which menages the switching between them. However now one of the tab opens an ActionSheet with couple of choices.
I have to open a new NavigationController on one of the ActionSheet button click.
Here is a fragment that defining which button was clicked:
switch (buttonIndex) {
case 0:
[self openMyNavigationController];
break;
case 1:
break;
case 2:
break;
default:
break;
}
I have no idea how should the openMyNavigationController method look
Started it like this:
UIViewController *myViewController = [[MyViewController alloc ] nitWithNibName:@"MyViewController" bundle:nil];
UINavigationController *navMyViewController = [[UINavigationController alloc] initWithRootViewController:myViewController];
What should I do to display the newly created NavigationController on the screen?
I linked a new NavigationController to the tab item. I also open ActionSheet menu for that tab, which is basically what client wanted but from a user sight is ultimately stupid, since buttons to another ViewControllers should lay on newly opened tab… I hope the client changes mind.