While it is impossible to apply different alignments on one label, if the last (and some only) line should be aligned to the right, why not align the entire label to the right?

EDIT
If this does not fix your problem, I donβt think it can be resolved without code.
In case you decide to write some code, you can study what is the last line of your line (maybe: How to get text from the nth line of UILabel? ) And try to apply other formatting using AttributedString .
If this works, you can always subclass UILabel and override func layoutSubviews() to calculate this automatically for you. That way, you no longer have to think about it!
source share