ios纯代码下的起始页面配置方法

在delegate中:

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        // Override point for customization after application launch.
        let SCREEN_WIDTH = UIScreen.mainScreen().bounds.size.width
        let SCREEN_HEIGHT = UIScreen.mainScreen().bounds.size.height
        self.window = UIWindow(frame: CGRectMake(0,0,SCREEN_WIDTH,SCREEN_HEIGHT))
        self.window?.rootViewController = RootViewController()
        self.window?.makeKeyAndVisible()
        return true
    }

posted on 2016-04-11 21:08  罗小夕  阅读(298)  评论(0编辑  收藏  举报

导航