NSTextAlignment.Justified for UILabel no funciona
Estoy tratando de justificar miUILabel
texto pero no funciona.
Declaración de miUIView
:
descriptionUIView = UIView(frame: CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height)
Declaración de miUILabel
:
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
Y se ve así:
No sé qué más usar esoNSTextAlignment.Justified
para justificar mi texto ¿Debo usar unUITextView
¿en lugar?