Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 2.42 KB | None | 0 0
  1. import UIKit
  2.  
  3. @UIApplicationMain
  4. class AppDelegate: UIResponder, UIApplicationDelegate {
  5.    
  6.     var window: UIWindow?
  7.    
  8.     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
  9.         // Override point for customization after application launch.
  10.         window = UIWindow(frame: UIScreen.main.bounds)
  11.        
  12.         let homeViewController = HomeViewController()
  13.         window?.rootViewController = homeViewController
  14.         window?.makeKeyAndVisible()
  15.  
  16.         return true
  17.     }
  18.    
  19.     func applicationWillResignActive(_ application: UIApplication) {
  20.         /* Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary
  21.          interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition
  22.          to the background state
  23.          */
  24.         /* Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method
  25.          to pause the game.
  26.          */
  27.     }
  28.    
  29.     func applicationDidEnterBackground(_ application: UIApplication) {
  30.         /* Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to
  31.          restore your application to its current state in case it is terminated later.
  32.          */
  33.         /* If your application supports background execution, this method is called instead of
  34.          applicationWillTerminate: when the user quits.
  35.          */
  36.     }
  37.    
  38.     func applicationWillEnterForeground(_ application: UIApplication) {
  39.         /* Called as part of the transition from the background to the active state; here you can undo
  40.          many of the changes made on entering the background.
  41.          */
  42.     }
  43.    
  44.     func applicationDidBecomeActive(_ application: UIApplication) {
  45.         /* Restart any tasks that were paused (or not yet started) while the application was inactive.
  46.          If the application was previously in the background, optionally refresh the user interface.
  47.          */
  48.     }
  49.    
  50.     func applicationWillTerminate(_ application: UIApplication) {
  51.         /* Called when the application is about to terminate. Save data if appropriate. See also
  52.          applicationDidEnterBackground:.
  53.          */
  54.     }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement