I have used UINavigationBar.appearance() in swift. By using this, I have changed the backgroundColor and the textColor of UINavigationBarusing the below code. 
However, I can't find the numberOfLinesattribute of the UINavigationBar title text. Any help on this is appreciated.
 var naviAppreance = UINavigationBar.appearance()
 naviAppreance.tintColor = uicolorFromHex(0xffffff)
 naviAppreance.barTintColor = uicolorFromHex(0x00cc66)
 naviAppreance.titleTextAttributes = [ NSForegroundColorAttributeName : UIColor.whiteColor()]