Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios AppDelegate中的开关视图(Swift)_Ios_Swift_View_Appdelegate - Fatal编程技术网

Ios AppDelegate中的开关视图(Swift)

Ios AppDelegate中的开关视图(Swift),ios,swift,view,appdelegate,Ios,Swift,View,Appdelegate,我需要根据用户是否注册设置我的应用程序的起始视图。 这将在AppDelegate中完成: func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { if(isUserRegistrated() == true){ let vc : A

我需要根据用户是否注册设置我的应用程序的起始视图。 这将在AppDelegate中完成:

       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类型的值没有序列图像板的成员”


有什么结论吗

示例:

let storyboard = UIStoryboard(name: "MyStoryboardName", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("someViewController") as! UIViewController
self.presentViewController(vc, animated: true, completion: nil)

示例:

let storyboard = UIStoryboard(name: "MyStoryboardName", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("someViewController") as! UIViewController
self.presentViewController(vc, animated: true, completion: nil)

你注册了你的故事板吗?我如何注册我的故事板?你注册了你的故事板吗?我如何注册我的故事板?当我这样做时,我得到错误:“Instants成员故事板不能用于类型AppDelegate”当我这样做时,我得到错误:“Instants成员故事板不能用于类型AppDelegate”