I would like to customize my navigation title but run into a problem. "String is not identical to NSObject". Can someone point me in the right direction? My code is below,
let font = UIFont(name: "HelveticaNeue", size: 15.0)
let textFont = [NSFontAttributeName: font]
let navText = [NSAttributedString(string: "MY STRING HERE", attributes: textFont)]
var navString = UILabel()
navString.appendAttributedString(navText)
self.navigationItem.titleView = navString
UPDATE: I was able to solve the problem with the following code,
var navString: NSString = "MY STRING HERE"
var completedNavString = NSMutableAttributedString()
completedNavString = NSMutableAttributedString(string: navString as String, attributes: [NSFontAttributeName:UIFont(name: "Georgia", size: 18.0)!])
var navLabel = UILabel()
navLabel.attributedText = completedNavString
navLabel.sizeToFit()
self.navigationItem.titleView = navLabel