ios swift跳转Guide和主页

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        
        self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
        NSUserDefaults.standardUserDefaults().objectForKey("FirstLanght") == nil ? enterGuide() : enterMain()
        
        return true
    }
    
    func enterGuide(){
        var guideController = GuideViewController()
        self.window!.rootViewController = guideController
        self.window!.backgroundColor = UIColor.whiteColor()
        self.window!.makeKeyAndVisible()
    }
    
    func enterMain(){
        self.window!.rootViewController = ViewController()
        self.window!.backgroundColor = UIColor.whiteColor()
        self.window!.makeKeyAndVisible()
    }

你可能感兴趣的:(ios swift跳转Guide和主页)