title: Application crash on assigning border width and color to textview in swift
body: <p>I am assigning border width and color to textview and it is crashing with this error: Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)</p>
  
  <p>Here is my code:</p>
  
  <pre><code>class RatingViewController: UIViewController,UITextViewDelegate {
  
  @IBOutlet weak var ratingTextView: UITextView!
  override func viewDidLoad() {
      super.viewDidLoad()
      ratingTextView.delegate = self
      ratingTextView.layer.borderColor = UIColor.black as! CGColor
      ratingTextView.layer.borderWidth = 1.0
      // Do any additional setup after loading the view.
  }
  </code></pre>
  
  <p>}</p>