Do you have any ideas about line spacing with UITextView? I cannot apply it. Below it is my code.
import UIKit
class DetailViewController: UIViewController {
You need to use an attributed string and assign a paragraph style. For example:
let style = NSMutableParagraphStyle()
style.lineSpacing = 20
let attributes = [NSParagraphStyleAttributeName : style]
textView.attributedText = NSAttributedString(string: txtString, attributes: attributes)
See this SO answer for more details on attributed string usage: How do I make an attributed string using Swift?