Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // AppDelegate.swift
- // KIPU
- //
- // Created by Elvis on 4/21/18.
- // Copyright © 2018 Elvis. All rights reserved.
- //
- import UIKit
- import TOPasscodeViewController
- @UIApplicationMain
- class AppDelegate: UIResponder, UIApplicationDelegate {
- var window: UIWindow?
- func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
- // Override point for customization after application launch.
- let loginViewController = LoginHostViewController()
- self.window = UIWindow(frame: UIScreen.main.bounds)
- self.window?.rootViewController = loginViewController
- self.window?.makeKeyAndVisible()
- if UserController.default.pin != nil {
- let vc = PinViewController(style: TOPasscodeViewStyle.opaqueLight, passcodeType: TOPasscodeType.fourDigits)
- loginViewController.present(UINavigationController(rootViewController: vc), animated: false, completion: nil)
- }
- self.setupAppearance()
- return true
- }
- func setupAppearance() {
- UINavigationBar.appearance().barTintColor = UIColor(hex: 0x0091FF)
- UINavigationBar.appearance().tintColor = UIColor.white
- UINavigationBar.appearance().titleTextAttributes = [NSAttributedStringKey.foregroundColor : UIColor.white]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement