Uitextview Text Alignment

[Solved] Uitextview Text Alignment | Swift - Code Explorer | yomemimo.com
Question : uitextview text alignment

Answered by : wicked-wolf-kfrr7ktv1iyg

Swift 5:
let textView = UITextView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
let style = NSMutableParagraphStyle()
style.alignment = .center
let text = NSAttributedString(string: yourtextcontentstring, attributes: [NSParagraphStyleAttributeName:style])
textView.attributedText = text

Source : | Last Update : Mon, 13 Dec 21

Answers related to uitextview text alignment

Code Explorer Popular Question For Swift