Linked Questions

6 votes
2 answers
11k views

UILabel text to fill in the frame width

I want to build typography poster using UILabel left and margin: 25 320(device width) - 50(sum of the margins) = 270(label width frame) The font size of each label should change in order to fit in ...
user avatar
7 votes
3 answers
2k views

Cut-off title label in UINavigationBar in iOS 5

Using the iOS 5 SDK I'm writing an app that uses a custom, script style font in its UINavigationBar instance. The problem with this font is that, since it is in the script style, its glyphs exceed the ...
maxluzuriaga's user avatar
  • 1,327
4 votes
1 answer
1k views

iOS7 - Adjusting font size of multiline label to fit its frame

I need to fit a multiline attributed text in a UILabel's frame. Reading this thread How to adjust font size of label to fit the rectangle? I started from Niels' solution in order to work with ...
DAN's user avatar
  • 929
2 votes
2 answers
1k views

UILabel: adjust font size to height with AutoLayout

I'd like to have several labels one below the other. The are sized with AutoLayout, I'd like to have the font size as big as possible. adjustsFontSizeToFitWidth only works for the width, but the I get ...
swalkner's user avatar
  • 17k
1 vote
1 answer
824 views

UILabel font size as per UIView frame size

I am create editable label with dynamic size. I am using pan gesture to scale my view and I want increase font size as per view. I used that code func scaleGesture(recognizer: UIPanGestureRecognizer) {...
Kamlesh Shingarakhiya's user avatar
2 votes
1 answer
335 views

Content hugging with auto shrink

I have a UILabel with no of lines = 1 and auto shrink set to a minimum font size of 9. The font size of the label is system 70.0 I have increased the content hugging priority to 1000. I did this ...
Naveen Ramanathan's user avatar
2 votes
0 answers
314 views

How to find the biggest text size that fits a UILabel or UIButton using autolayout?

Given a layout that you set up using constraints, how do you find the biggest text size that fits your labels and buttons? You can use adjustsFontSizeToFitWidth for labels but it only cares about ...
Ferran Maylinch's user avatar
0 votes
0 answers
273 views

Why UILabel with Lines = 1 and Autoshrink = minimumFontSize(1) is not fitting the text inside its frame?

I am really going crazy with this so I hope any of you can point me to the right direction. I have an app and I designed it with autolayout, so the views and labels resize according to the screen ...
acecilia's user avatar
  • 938
0 votes
0 answers
171 views

Resize font of label in custom tableViewCell

So I have a custom table view cell and I want a label to be resized based on the text in it. I've already tried doing this in the cellForRowAtIndexPath method- cell.titleLabel....
praks5432's user avatar
  • 7,514
0 votes
1 answer
141 views

2 UIButtons with different text lenght same font size

I have 2 buttons with the same width and height, also y-Achse centered. They differ only from text length. With iPhone 5, 6 and 6+ they look very well. But with iPhone 4s one button will do not more ...
Fahem Issameddine's user avatar
0 votes
0 answers
126 views

Space in Front of UILabel

So I'm mid-way into my first iOS app and I've hit a roadblock. Every time I try to use a UILabel with a custom font, there seems to be a space in front of the text, which cuts off the end of the text....
user2455722's user avatar