//
//  NavigationItem.swift
//  ledger-wallet-ios
//
//  Created by Nicolas Bigot on 13/01/2015.
//  Copyright (c) 2015 Ledger. All rights reserved.
//

import UIKit

class NavigationItem: UINavigationItem {
    
    //MARK: Style management
    
    override var title: String? {
        didSet {
            let label = (self.titleView as? UILabel) ?? UILabel()
            label.text = title ?? ""
            label.style = "navigationBar.title"
            label.sizeToFit()
            self.titleView = label
        }
    }
    
    //MARK: Localization
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
        self.title = localizedString(self.title ?? "")
        self.leftBarButtonItem?.customView?.sizeToFit()
        self.rightBarButtonItem?.customView?.sizeToFit()
    }
    
}

//
//  NavigationItem.swift
//  ledger-wallet-ios
//
//  Created by Nicolas Bigot on 13/01/2015.
//  Copyright (c) 2015 Ledger. All rights reserved.
//

import UIKit

class NavigationItem: UINavigationItem {
    
    //MARK: Style management
    
    override var title: String? {
        didSet {
            let label = (self.titleView as? UILabel) ?? UILabel()
            label.text = title ?? ""
            label.style = "pageTitle"
            label.sizeToFit()
            self.titleView = label
        }
    }
    
    //MARK: Localization
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
        self.title = localizedString(self.title ?? "")
        self.leftBarButtonItem?.customView?.sizeToFit()
        self.rightBarButtonItem?.customView?.sizeToFit()
    }
    
}

--- 
+++ 
@@ -16,7 +16,7 @@
         didSet {
             let label = (self.titleView as? UILabel) ?? UILabel()
             label.text = title ?? ""
-            label.style = "pageTitle"
+            label.style = "navigationBar.title"
             label.sizeToFit()
             self.titleView = label
         }
Update navigation item title style
