Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 1.39 KB | None | 0 0
  1. //
  2. //  AppDelegate.swift
  3. //  KIPU
  4. //
  5. //  Created by Elvis on 4/21/18.
  6. //  Copyright © 2018 Elvis. All rights reserved.
  7. //
  8.  
  9. import UIKit
  10. import TOPasscodeViewController
  11.  
  12. @UIApplicationMain
  13. class AppDelegate: UIResponder, UIApplicationDelegate {
  14.  
  15.     var window: UIWindow?
  16.  
  17.  
  18.     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
  19.         // Override point for customization after application launch.
  20.         let loginViewController = LoginHostViewController()
  21.         self.window = UIWindow(frame: UIScreen.main.bounds)
  22.         self.window?.rootViewController = loginViewController
  23.         self.window?.makeKeyAndVisible()
  24.        
  25.         if UserController.default.pin != nil {
  26.             let vc = PinViewController(style: TOPasscodeViewStyle.opaqueLight, passcodeType: TOPasscodeType.fourDigits)
  27.             loginViewController.present(UINavigationController(rootViewController: vc), animated: false, completion: nil)
  28.         }
  29.         self.setupAppearance()
  30.         return true
  31.     }
  32.    
  33.    
  34.     func setupAppearance() {
  35.         UINavigationBar.appearance().barTintColor =  UIColor(hex: 0x0091FF)
  36.         UINavigationBar.appearance().tintColor = UIColor.white
  37.         UINavigationBar.appearance().titleTextAttributes = [NSAttributedStringKey.foregroundColor : UIColor.white]
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement