NSTextAlignment.Justified for UILabel funktioniert nicht
Ich versuche mein @ zu rechtfertigUILabel
Text, aber es funktioniert nicht.
Deklaration meinesUIView
:
descriptionUIView = UIView(frame: CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height)
Deklaration meinesUILabel
:
bottleDescriptionLabel = UILabel(frame: CGRect(x: widthMargin, y: bottleDescriptionTitleLabel.frame.maxY + heightMargin, width: self.view.frame.width - (2 * widthMargin), height: heightBottleDescription - (2 * heightMargin)))
bottleDescriptionLabel.font = UIFont(name: "AvenirNext-Regular", size: 16)
bottleDescriptionLabel.text = bottleDescriptionString
bottleDescriptionLabel.lineBreakMode = NSLineBreakMode.ByWordWrapping
bottleDescriptionLabel.textAlignment = NSTextAlignment.Justified
bottleDescriptionLabel.numberOfLines = 0
Und es sieht so aus:
Ich weiß nicht, was ich sonst noch verwenden sollNSTextAlignment.Justified
, um meinen Text zu begründen. Soll ich ein @ verwendUITextView
stattdessen