Ich habe ein UITabBarController
Behälter 4 View-Controller und zwei andere Ansicht Controller als SplashScreenVC
und LoginScreenVC
als i UINavigationViewController
als Root-View-Controller gesetzt haben und initiieren mit Hilfe der Navigationssteuereinrichtung in meinem Storyboard Splash Screen aber Wenn ich die App TabBarController und Splash-Screen tatsächlich laufen beide gleichzeitig ausführen. Ich möchte alle Ansichten der Tableiste laden, die nach dem Begrüßungsbildschirm und der Übermittlung der Anmeldedaten geladen werden. Hier ist mein Code, wo ich Root-View-Controller gesetzt.UITabBarController läuft parallel mit meinem splashsceen
UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
HomeViewController *homeVC = [[HomeViewController alloc]init];
homeVC.title = @"Home";
NotificationViewController *notificationVC = [[NotificationViewController alloc]init];
notificationVC.title = @"Notifications";
ProfileViewController *profileVC = [[ProfileViewController alloc]init];
profileVC.title = @"Profile";
SelfiesCollectionViewController *selfiesCollectionVC = [[SelfiesCollectionViewController alloc]init];
selfiesCollectionVC.title = @"Selfie Collection";
homeVC = [storyBoard instantiateViewControllerWithIdentifier:@"HomeViewController"];
profileVC = [storyBoard instantiateViewControllerWithIdentifier:@"ProfileViewController"];
notificationVC = [storyBoard instantiateViewControllerWithIdentifier:@"NotificationViewController"];
selfiesCollectionVC = [storyBoard instantiateViewControllerWithIdentifier:@"SelfiesCollectionViewController"];
self.tabBarController = [[UITabBarController alloc]init];
self.tabBarController = [storyBoard instantiateViewControllerWithIdentifier:@"UITabBarController"];
self.tabBarController.viewControllers = @[homeVC,notificationVC,profileVC,selfiesCollectionVC];
UINavigationController *navigationVC = [[UINavigationController alloc]init];
navigationVC = [storyBoard instantiateViewControllerWithIdentifier:@"UINavigationController"];
[self.window setRootViewController:navigationVC];
Vielen Dank Herr mich zu korrigieren. –
Sitzen dort ist immer noch ein Problem .. Nach Ihrer Lösung mein LoginVC wurde nicht der Teil der Tab-Leiste. Und noch immer laufen die anderen View-Controller der Tab-Leiste zusammen. Ich möchte zuerst den Login-Bildschirm anzeigen, dann den Benutzernamen und das Passwort nach der Bestätigung überprüfen, dann möchte ich meine Tab-Leiste ausführen und die Controller in der Tab-Leiste anzeigen. Aber mein Problem ist immer noch da. –