title: UIScrollView and UITextView
body: <p>I'm new to Swift (and programming in general). I'm having some issues getting a Text View to scroll.</p>
  
  <p>I've created outlets for the scroll view and the text view already.</p>
  
  <p>I've found a boat load of people asking the same question on Stack Overflow/Reddit but I am still unable to fix the issue due to just not really knowing what I'm doing.</p>
  
  <p>Here is a screenshot of my view controller so you can see the text I am referring to:</p>
  
  <p><a href="https://i.stack.imgur.com/wsZ6T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wsZ6T.png" alt="enter image description here"></a></p>
  
  <p>And here is the code I have in my <code>viewcontroller.swift</code> file:</p>
  
  <pre><code>import UIKit
  class ViewController: UIViewController {
  
  @IBOutlet weak var scrollView: UIScrollView!
  @IBOutlet weak var descriptionTextView: UITextView!
  
  
  override func viewDidLayoutSubviews() {
  
  
  
      super.viewDidLayoutSubviews()
      self.scrollView.layoutIfNeeded()
      self.scrollView.contentSize = self.descriptionTextView.bounds.size
  }
  
  
  override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  }
  </code></pre>
  
  <p>I'm getting the following green error message when I build:</p>
  
  <blockquote>
    <p>Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)</p>
  </blockquote>
  
  <p>I would love some help from anyone if you are feeling kind or have the time to chime in.</p>
  
  <p>Call me crazy, but would it be silly to believe that it is just overwhelmingly difficult to achieve such a simple thing as scrollable text? I feel like I'm missing something.</p>
  
  <p>Thanks to anyone who may be able to lend a hand.</p>