简体   繁体   中英

Swift : stacking text vertically in horizontal line

Is there a way in Swift to have casually vertical stacked text inline? I'm outputting chord names for instance in a part of my app, and I'd like to have some parts stacked vertically in braces such as in this example:

弦

(here there's only 2 elements stacked but it could go up to 6 elements in a 2 times 3 vertical ones fashion)

Thanks !

You could use a vertical StackView (for the ♭5 and the add 13 ) within a horizontal StackView and just change the height of the texts accordingly.

就这样。

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