The following code worked fine until upgrading to Xcode 6.1 to stay with iOS 8.1:
override func viewDidAppear(animated: Bool) { self.navigationController?.navigationBar.topItem?.title = "Home" self.navigationController?.navigationBar.titleTextAttributes = [ NSFontAttributeName: UIFont(name: "Lobster 1.4", size: 34), NSForegroundColorAttributeName: UIColor.whiteColor()] }
The problem is specifically in NSFontAttributeName: UIFont(name: "Lobster 1.4", size: 34)
and the error I get here:
! "Could not find an overload for 'init' that accepts the supplied arguments"
I found this original code in another StackOverflow question, and it worked as expected before this update (downloaded it yesterday). My font is really installed correctly.
Should I write this code differently now, or is there a whole new way that I have to set my Navigation Bar Font?
Thanks!
Benji source share