Pixate / pixate-freestyle-ios

Pixate Freestyle for iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UITabBarItem Font Not working in iOS 8.3

cliftonlabrum opened this issue · comments

--- blows dust off Pixate Freestyle --- ;)

Setting the font of a tab bar item no longer works in Pixate as of iOS 8.3 and Xcode 6.3:

tab-bar-item {
  color: #696D72;
  font-family: "Avenir Next";
  font-weight:600;
  font-size:12px;
}

This is likely caused by the fact that the UIFont has to be force unwrapped. Doing this with UIAppearance used to be this:

UITabBarItem.appearance().setTitleTextAttributes([NSFontAttributeName: UIFont(name: "AvenirNextCondensed-DemiBold", size:12)], forState:.Normal)

...but now must be this:

UITabBarItem.appearance().setTitleTextAttributes([NSFontAttributeName: UIFont(name: "AvenirNextCondensed-DemiBold", size:12)!], forState:.Normal)

Note the ! after UIFont(...) There's a chance this will start creeping up for all font usage in Pixate.