longbow
longbow

Reputation: 1623

ios8/xcode6.1: custom font ignored at runtime when set in storyboard

I imported 2 *.ttf font files for a normal and bold font into xcode, set everything up in the .plist etc - and I can perfectly view the font in the storyboard now.

Unfortunately attributed textviews as well as labels or buttons will ignore my font when I set it in storyboard mode!

If I generate something programmatically it works fine, e.g. like this:

var testButton = UIButton()
testButton.setTitle("Abbrechen", forState: UIControlState.Normal)
testButton.backgroundColor = UIColor.blueColor()
testButton.titleLabel?.font = UIFont(name: "FaktConPro-Bold", size: 37)
testButton.tintColor = UIColor.redColor()
testButton.frame = CGRectMake(0 , 0, self.view.frame.width, 60)

view.addSubview(testButton)

any hints? does iOS prefer any format?

€dit:setting the labels and textfields to "plain" instead of "attributed" temporarily fixes the problem

Upvotes: 4

Views: 276

Answers (1)

fz.
fz.

Reputation: 3233

This is a bug on Xcode. I already created a radar a couple of month ago. Here: http://openradar.appspot.com/radar?id=5117089870249984

Upvotes: 1

Related Questions