title: How to horizontally center UITextView content in iOS, but not using Align Center?
body: <p>I want to achieve something very specific. It is hard to describe in words so here are some mockups..</p>
  
  <p>Current stage: I have a UITextView which has autolayout constraints set to be as wide as the parent container. 
  <a href="https://i.stack.imgur.com/kbELS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kbELS.png" alt="Left aligned text"></a></p>
  
  <p>What I want to achieve: I would like to horizontally center the contents in the UITextView, so that they appear in center but are still left aligned
  <a href="https://i.stack.imgur.com/HlSUj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HlSUj.png" alt="Content centered but left aligned text"></a></p>
  
  <p>Most solutions rely on TextAlignCenter option to center the text horizontally, however this is not something that I want as it will appear as such instead:
  <a href="https://i.stack.imgur.com/eY7cc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eY7cc.png" alt="Centered aligned text"></a></p>
  
  <p>Any way to achieve this?</p>
  
  <p>I've tried the below:</p>
  
  <ol>
  <li>textview.sizeToFit() seems to adjust the height but not the width</li>
  <li>textview.contentOffset does not seem to work</li>
  <li>Removing the constraints in autolayout and use Editor > Fix all in scope seems to work on UIButtons but not UITextView..</li>
  </ol>
  
  <p>The reason I want to do this is although it is not noticable on iPhones, on iPads if the text are short they appear all the way to the left, which is very far from my other interactable buttons in my app.</p>