Skip to content

Commit

Permalink
Merge pull request #102 from mattrubin/bar-appearance
Browse files Browse the repository at this point in the history
Bar appearance
  • Loading branch information
mattrubin committed Feb 1, 2016
2 parents 26f62ff + 605517b commit 725c37e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 0 additions & 10 deletions Authenticator/Source/OTPAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ class OTPAppDelegate: UIResponder, UIApplicationDelegate {
let app = AppController()

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
UINavigationBar.appearance().barTintColor = UIColor.otpBarBackgroundColor
UINavigationBar.appearance().tintColor = UIColor.otpBarForegroundColor
UINavigationBar.appearance().titleTextAttributes = [
NSForegroundColorAttributeName: UIColor.otpBarForegroundColor,
NSFontAttributeName: UIFont(name: "HelveticaNeue-Light", size: 20)!
]

UIToolbar.appearance().barTintColor = UIColor.otpBarBackgroundColor
UIToolbar.appearance().tintColor = UIColor.otpBarForegroundColor

UIBarButtonItem.appearance().setTitleTextAttributes([NSFontAttributeName: UIFont(name: "HelveticaNeue-Light", size: 17)!], forState: UIControlState.Normal)

// Restore white-on-black style
Expand Down
14 changes: 12 additions & 2 deletions Authenticator/Source/RootViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,20 @@
import UIKit

class OpaqueNavigationController: UINavigationController {
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
override func viewDidLoad() {
super.viewDidLoad()

navigationBar.translucent = false
navigationBar.barTintColor = UIColor.otpBarBackgroundColor
navigationBar.tintColor = UIColor.otpBarForegroundColor
navigationBar.titleTextAttributes = [
NSForegroundColorAttributeName: UIColor.otpBarForegroundColor,
NSFontAttributeName: UIFont(name: "HelveticaNeue-Light", size: 20)!
]

toolbar.translucent = false
toolbar.barTintColor = UIColor.otpBarBackgroundColor
toolbar.tintColor = UIColor.otpBarForegroundColor
}
}

Expand Down

0 comments on commit 725c37e

Please sign in to comment.