0
我是ios的新手。我試着用UITabbarController工作,當我嘗試從ViewController(這個ViewController不是Tabbar中的一個項目)傳遞數據到Tabbar中的其他ViewController時,我遇到了一些問題。在這種情況下,當我點擊按鈕登錄按鈕時,會出現「歡迎購物」並且登錄表單中的用戶名將在「歡迎購物」中進入標籤。 如何在使用presentViewController和UITabbarController時傳遞數據
我用下面的代碼,使「開山鼻祖店」控制器出現:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UITabBarController *tabbarController= [storyboard instantiateViewControllerWithIdentifier: @"tabbarID"];
[self presentViewController: tabbarController animated: YES completion: nil];
所以任何想法對我來說,通過用戶名(在LoginController中)爲標籤(WelcomeToShopController)?