美文网首页
创建导航视图控制器

创建导航视图控制器

作者: 行有余 | 来源:发表于2016-11-03 15:56 被阅读0次

    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #008400; -webkit-text-stroke: #000000}p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; -webkit-text-stroke: #000000; min-height: 15.0px}p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; -webkit-text-stroke: #000000}p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #bb2ca2; -webkit-text-stroke: #000000}p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #703daa; -webkit-text-stroke: #000000}p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'PingFang SC'; color: #008400; -webkit-text-stroke: #000000}p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #3d1d81; -webkit-text-stroke: #000000}span.s1 {font-kerning: none; font-variant-ligatures: no-common-ligatures}span.s2 {font: 13.0px 'PingFang SC'; font-kerning: none; font-variant-ligatures: no-common-ligatures}span.s3 {font-kerning: none; font-variant-ligatures: no-common-ligatures; color: #bb2ca2}span.s4 {font-kerning: none; font-variant-ligatures: no-common-ligatures; color: #000000}span.s5 {font-kerning: none; font-variant-ligatures: no-common-ligatures; color: #703daa}span.s6 {font: 13.0px Menlo; font-kerning: none; font-variant-ligatures: no-common-ligatures; color: #000000}span.s7 {font: 13.0px Menlo; font-kerning: none; font-variant-ligatures: no-common-ligatures}span.s8 {font-kerning: none; font-variant-ligatures: no-common-ligatures; color: #4f8187}span.s9 {font-kerning: none; font-variant-ligatures: no-common-ligatures; color: #3d1d81}

    //
    // AppDelegate.swift
    // UINavigationController
    //
    // Created by SZT on 2016/11/2.
    // Copyright © 2016年 SZT. All rights reserved.
    //

    import UIKit

    @UIApplicationMain
    class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?
    
    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        //根据一个根视图控制器创建一个导航视图控制器
        let vc = ViewController()
        let navc = UINavigationController(rootViewController: vc)
        //将应用的根视图控制器设置为导航视图控制器
        window = UIWindow(frame: UIScreen.mainScreen().bounds)
        window?.rootViewController = navc
        window?.backgroundColor = UIColor.whiteColor()
        window?.makeKeyAndVisible()
        return true
    }
    
    func applicationWillResignActive(application: UIApplication) {
        // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
        // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
    }
    
    func applicationDidEnterBackground(application: UIApplication) {
        // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
    }
    
    func applicationWillEnterForeground(application: UIApplication) {
        // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
    }
    
    func applicationDidBecomeActive(application: UIApplication) {
        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
    }
    
    func applicationWillTerminate(application: UIApplication) {
        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
    }
    

    }

    相关文章

      网友评论

          本文标题:创建导航视图控制器

          本文链接:https://www.haomeiwen.com/subject/wutiuttx.html