custom font on UIbutton title clipped on top of word
I had a similar problem, where a diaeresis got cut off on top of the titlelabel.
I made a UIButton subclass and used this code to fix the problem:
-(void)layoutSubviews
{
[super layoutSubviews];
CGRect frame = self.titleLabel.frame;
frame.size.height = self.bounds.size.height;
frame.origin.y = self.titleEdgeInsets.top;
self.titleLabel.frame = frame;
}
Cropped UIButton Title
So I just ended up setting the UIButton title to nil and added my own UILabel as a subview to the UIButton. I set the UILabel frame to the same size as the button and set it to be centered.
Not the most elegant solution I am sure, but it gets the job done.
Custom font not showing diaeresis in capital letters
I solved this problem by following this answer on the question shared by Bob
https://stackoverflow.com/a/8314197/617787
The only thing to be aware of this solution (changing the "ascender" of the font file) is that the space between lines on multiline UILabels using this modified font will change as well, so you might use NSAttributedString to modify it in a per case basis.
Changing UILabel title in custom UIButton without positional change
You can do it in many way but the simplest way :
Take a UIView and then others two-element (a label a imageView) set in this View and make it look like button then set constraint as you want. Then addTarget to label and do all functionality to that that target selector method.
Related Topics
Itms-90809: Deprecated API Usage - Existing App That Use Uiwebview Are No Longer Accepted
Optional Binding Succeeds If It Shouldn'T
Getting Random "Facebookerrdomain Error 10000"
What's Wrong Here: Instance Member Cannot Be Used on Type
iOS 7 Uitoolbar Overriding with Status Bar
How to Segue with Data from One Tab to Another Tab Properly
How to Clear/Reset All Coredata in One-To-Many Relationship
iOS - Mkmapview - Draggable Annotations
Retrieving Data Using Firebase Swift
How to Create an Nsdecimal Without Using Nsnumber and Creating Autoreleased Objects
Libz.Dylib Versus Libz.1.2.3.Dylib Versus Libz.1.2.5.Dylib
iOS Color to Transparent in Uiimage
Stuck on Using Mkpinannotationview() Within Swift and Mapkit
Itunes Connect: Can't See Build
Swift Execute Asynchronous Tasks in Order
Detecting Tap Inside a Bezier Path
Expandable Uitableview Cell Using Autolayout Results in Uiviewalertforunsatisfiableconstraints