A UILabel attribute for text appearance
Questions tagged [autoshrink]
8 questions
12
votes
2 answers
Setting the same font size for different labels AFTER scaling
I am making an app where I have 3 labels. I am using label auto-shrinking to help adapt the label's font size to the device.
These labels are right next to each other, and that therefore means that I want them to have them the same font size. What…

D-A UK
- 1,084
- 2
- 11
- 24
4
votes
0 answers
Synchronizing UILabel Autoshrink
I have 3 UIButtons in a row. I'm even being good and using a UIStackView.
When I localised; one of the three labels exceeded my bounds. So, to compensate; I kicked in Autoshrink.
buttons = [receivedButton, usedButton, sentButton]
_ =…

Dru Freeman
- 1,766
- 3
- 19
- 41
3
votes
2 answers
Xcode font scale (auto-shrink) not working properly
I have a label, in which is a main feature of the content. I therefore have it set to autoshrink.
The problem is that when I run it on some of the smaller devices, the text is shifted downwards horrendously based on the label box.
How do I fix…

D-A UK
- 1,084
- 2
- 11
- 24
1
vote
1 answer
Detect tap for UILabel with Autoshrink to minimum font size enabled
I am using the following UITapGestureRecognizer that I modified so others could copy and paste to see the same output as me.
extension UITapGestureRecognizer {
func didTapAttributedTextInLabel(label: UILabel, inRange targetRange: NSRange) ->…

Joseph Astrahan
- 8,659
- 12
- 83
- 154
1
vote
1 answer
Swift: UINavigationItem displaying truncated text
Is there an option that gets the UINavigationItem text to truncate dynamically based on the view type?
Those are the only properties I can edit:
I managed to do so for the UILabel by setting the Line Break and Autoshrink property (but can't find…

mm24
- 9,280
- 12
- 75
- 170
0
votes
1 answer
Autoshrink fontsize of UILabeltext siwft
I have a multiline UILabel text which expands dynamically according to the text length. I have setup proper auto layout in storyboard and grows bigger if the text is lengthy.
But i want to reduce the font size to 24 if its 2-line and to 20 if its…

j.krissa
- 223
- 5
- 21
0
votes
0 answers
UILabel is character wrapping and not word wrapping correctly
I have a UITextLabel which isn't very wide. I want to display the text "Average Score" With "Average" on the top line and "Score" on the bottom line. But instead, I am getting
Averag
e Score
What I would like to happen is for the code to…

Chase Roberts
- 9,082
- 13
- 73
- 131
0
votes
1 answer
How to set auto size text for different screens
My task is to preserve the size and position of the elements inside my cell for different screen resolutions.
I did:
Established constraints for the red and green blocks (UILabels) to
the outer container.
Set the constraint between them equal…

Alex Kirov
- 29
- 1
- 8