Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

text-align-last css property Swift Equivalent

What is the swift Equivalent for 'text-align-last' css property? I prefer a codeless solution.

Here is what i have done and what i get:

enter image description here

The last line (sometimes the only one) is aligned to the left, which is inconvenient.

like image 725
Dorad Avatar asked Oct 29 '22 05:10

Dorad


1 Answers

You need to change the label's text from Plain to Attributed, then you can paste any string and the alignment, as well as other attributes, will hold. So basically any text style that can create on word processor application can be used here.

In the following example I've used pages (Mac application) to edit the text format as I liked and copied it to the label text box in Xcode.

enter image description here

Here is a picture of the simulator running the app: enter image description here

like image 96
inspector_60 Avatar answered Nov 15 '22 06:11

inspector_60