self.tabBarController dismissViewControllerAnimated funktioniert nicht
Ich habe einen UITabBarController in meiner Anwendung.
Ich möchte von einem Tab einen anderen UIViewController präsentieren.
Also schrieb ich hineinViewControllerA
(das ist ein Tab im Tabviewcontroller):
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
MyViewController *chooseTemplateController = [storyboard instantiateViewControllerWithIdentifier:@"myController"];
[self.tabBarController presentViewController:myController animated:NO completion:nil];
Dies zeigt MyViewController schön.
Wie kann ich MyViewController jedoch schließen?
Ich habe in vielen Fragen gelesen, die ich anrufen muss:
[self.tabBarController dismissViewControllerAnimated:NO completion:nil];
Aber woher nenne ich es? Ich habe es mit MyViewController versucht - aber da es nicht Teil der UITabBar ist, ist self.tabBarController null.
Ich initialisiere den UiTabBarController über das Storyboard und nicht über appDelegate und möchte es so belassen.