How to increase the space between text and underline in UILabel?

I have a single line UILabel with an attribute string that has an underscore. Does anyone know how to increase the space between this text and its underline? I would think that this should be commonplace, but I can not find the answer anywhere.

Thank!

+4
source share
1 answer

I don't think you can, but you can subclass UILabel and create your own line (for example, using UIBezierPath or CGPath) at a distance of your choice using the drawRect: method in your subclass.

+4
source

Source: https://habr.com/ru/post/1537576/


All Articles