lexrus / LTMorphingLabel

[EXPERIMENTAL] Graceful morphing effects for UILabel written in Swift.
MIT License
8.07k stars 782 forks source link

Interface builder font #36

Closed emrsn-SebastianVancea closed 9 years ago

emrsn-SebastianVancea commented 9 years ago

I've added the files manually to my project (just drag&drop, no framework created) since I have some issues with CocoaPods/Carthage. I have also set the Interface Builder class object of the label to LTMorphingLabel. Did not add module since it's the current one.

Issue is the label is displayed with some default font instead of the one set in the storyboard. The text also has a big top offset and only the top half is displayed. The label does not have a height constraint in the storyboard, it just has top/bottom/trailing/leading spaces to superview set.

Thank you for the library, I really appreciate it. Job well done!

Edit: The text position is almost fixed if I call layoutSubviews() on the label. The baseline is still a few pixels lower than the text using UILabel.

lexrus commented 9 years ago

Frankly, I knew this issue. But I need more time to think over it.

emrsn-SebastianVancea commented 9 years ago

It works fine in the example project. Any idea what causes it? Does it have something to do with the label updating after views are finished loading and layouting?

lexrus commented 9 years ago

screen shot 2015-04-24 at 12 10 40 pm

Please check out the latest source.

emrsn-SebastianVancea commented 9 years ago

Thank you, the fix works for the offset. It still ignores the storyboard Font in my app but everything looks ok if I set it programatically.