try setting button.contentEdgeInsets
property to align the title within the button, if it is an issue of misligned baseline of the font you can do this
button.titleLabel.baselineAdjustment = UIBaselineAdjustmentAlignCenters
Question
In my app, I used custom fonts. It works fine for UILabel
s, etc...
But the Title is cut from top for Button.
"See the S"
What is happening and how can I resolve this??
No correct solution
OTHER TIPS
try setting button.contentEdgeInsets
property to align the title within the button, if it is an issue of misligned baseline of the font you can do this
button.titleLabel.baselineAdjustment = UIBaselineAdjustmentAlignCenters
a few steps:
detail for this: http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/
thanks!
In my case it was the font file that was corrupted. Try to open the ttf file in your mac, select the 'S' and see if the frame that appears cuts off the letter. My solution was to change the ttf file.