开发者

How do I make the minimumFontSize property work for a multiline label

开发者 https://www.devze.com 2023-03-27 05:26 出处:网络
how do I make the minimumFontSize property work开发者_StackOverflow社区 for a multiline label. The documentation says it must have 1 line. Are there any workarounds. I have label with a primary purpos

how do I make the minimumFontSize property work开发者_StackOverflow社区 for a multiline label. The documentation says it must have 1 line. Are there any workarounds. I have label with a primary purpose to display short texts like this: -20% or +30% etc, but this is not enforced and there are ocasionally longer texts like Free cookies and I want to resize font but also have multiple lines. Like this:

+----------+
|   Free   |
| Cookies! |
+----------+

The label must always have the same size because it is transparent and has a fixed size image underneath it. Is it possible? The part where the users enter these data is not under my control, it is a web app, and I'm an iPhone using a webservice. This is still short enough for web but not for iPhone. Thanks in advance.


Have a look at Resize Multi-line Text to Fit UILabel on iPhone, this might help.

0

精彩评论

暂无评论...
验证码 换一张
取 消