简体   繁体   中英

Xcode UILabel bug? Line spacing cropping text with a UILabel

I have some designs I'm following for an iOS project. The font used is Avenir with relatively tight line spacing.

Some of these labels will have dynamic text, so I can't just make the label's size larger since the size should be determined by the content.

By default line spacing for a UILabel ends up pretty large.

默认行距

If I adjust the Line Height Multiple or the Max Height , the text along the top ends up cropped. 高度倍数


在此处输入图片说明

It should behave like this (Affinity Designer)... 在此处输入图片说明

Is there a way to handle this?

Thanks for your help!

I have some designs I'm following for an iOS project. The font used is Avenir with relatively tight line spacing.

Some of these labels will have dynamic text, so I can't just make the label's size larger since the size should be determined by the content.

By default line spacing for a UILabel ends up pretty large.

默认行距

If I adjust the Line Height Multiple or the Max Height , the text along the top ends up cropped. 高度倍数


在此处输入图片说明

It should behave like this (Affinity Designer)... 在此处输入图片说明

Is there a way to handle this?

Thanks for your help!

I have some designs I'm following for an iOS project. The font used is Avenir with relatively tight line spacing.

Some of these labels will have dynamic text, so I can't just make the label's size larger since the size should be determined by the content.

By default line spacing for a UILabel ends up pretty large.

默认行距

If I adjust the Line Height Multiple or the Max Height , the text along the top ends up cropped. 高度倍数


在此处输入图片说明

It should behave like this (Affinity Designer)... 在此处输入图片说明

Is there a way to handle this?

Thanks for your help!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM