0
我正在使用代碼波紋管來檢查用戶是否已登錄或註銷,並且工作正常。但是因爲我通過名字獲取故事板,我總是將用戶發送到iPhone「in」或「out」視圖控制器。如果我獲得積極的故事板,它會工作。我如何修復代碼?獲取活動的故事板
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
BOOL user = ...;
NSString *segue = user ? @"in" : @"out";
UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"iPhone" bundle:nil];
UIViewController *viewController = [storyBoard instantiateViewControllerWithIdentifier:segue];
[self.window setRootViewController:viewController];
return YES;
}