title: UITextview write in Text Center Alignment , swift
body: <p>I have one Text Editor when I tap to Bold Button </p>
  
  <p>I can write in Bold here is code </p>
  
  <pre><code>txtEditor.typingAttributes = [NSAttributedStringKey.foregroundColor.rawValue: UIColor.black/, NSAttributedStringKey.font.rawValue: UIFont.boldSystemFont(ofSize: (txtEditor.font?.pointSize)!)]
  </code></pre>
  
  <p>I want to have one button when I tap to Button (The Line who I write) I need to  in Centre Text Center Alignment and  not other Line before </p>
  
  <p>here is code </p>
  
  <pre><code>let paragraph = NSMutableParagraphStyle()
  paragraph.alignment = .center
  </code></pre>
  
  <p>but after how will to add this 2 line code in UITextview for typing in Centre Alignment ?</p>