我需要根據用戶的註冊或不註冊來設置我的應用的起始視圖。 這將在AppDelegate中完成:在AppDelegate中切換查看(Swift)
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
if(isUserRegistrated() == true){
let vc : AnyObject! = self.storyboard.instantiateViewControllerWithIdentifier("isRegistrated")
self.showViewController(vc as UIViewController, sender: vc)
}
else{
let vc : AnyObject! = self.storyboard.instantiateViewControllerWithIdentifier("isNOTRegistrated")
self.showViewController(vc as UIViewController, sender: vc)
}
}
在這一點上,我得到了錯誤: 「式的AppDelegate的值沒有故事板的成員」
任何結論呢?
有您註冊的故事板? –
我如何註冊我的故事板? – Dareyou