简体   繁体   中英

How to manage the line spacing in UILabel vertically

I am implementing a UILabel vertically.

The text has custom line spacing in iOS 7 & 8 with 在此处输入图片说明 autolayout storyboard.Please check attachment. 在此处输入图片说明

An option (probably not the best one, but it's something) is to have two separate labels for the B and the K and set the position and height for each so they appear to be the same.

With the right values they wouldn't have any gap between them, and line up on the edges, so there would be no queue that they're separate elements on the screen. And you could set the B to be bottom aligned and the K to be top aligned and use the label margins to get the desired spacing between them.

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