T
T
Timokins2015-05-18 22:58:38
Objective-C
Timokins, 2015-05-18 22:58:38

How to make UILabel size dynamic?

Greetings,
tell me which way to dig in
order to understand how to make the UILabel dimensions dynamic, i.e. as if in % ratio,
and the font size in UILabel changed accordingly.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
An, 2015-05-19
@Flanker_4

adjustsFontSizeToFitWidth
But there need numberOfLine == 1

S
svistkovr, 2015-05-19
@svistkovr

dig in the direction of sizeWithFont or boundingRectWithSize
these methods return the size of the container needed to fill the given line with the font, paragraph, etc. parameters.
UILabel won't resize dynamically for you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question