title: How to set the Border for a Textview using storyboard in Xcode10 using Swift 4
body: <p>I have created a Approver's Remarks TextView in my MainstoryBoard and created an outlet for it  in ApproveViewController.
  I am trying to create a border for my Textview using storyBoard and code</p>
  
  <p>1) So First, I have created a class called BorderTextView1. Below is my code for class BorderTextView1</p>
  
  <pre><code>import UIKit
  
  @IBDesignable
  class BorderTextView1: UITextView {
  
      var red = UIColor(red: 100.0, green: 130.0, blue: 230.0, alpha: 1.0)
  
      @IBInspectable var borderColor: UIColor? {
          set {
              layer.borderColor = red.cgColor
          }    
          get {
              guard let color = layer.borderColor else {
                  return nil
              }
              return UIColor(cgColor: color)
          }
      }
  
      @IBInspectable var borderWidth: CGFloat {
          set {
              layer.borderWidth = 2
          }
          get {
              return layer.borderWidth
          }
      }
  
      @IBInspectable var cornerRadius: CGFloat {
          set {
              layer.cornerRadius = 2.0
              clipsToBounds = newValue &gt; 0
          }
          get {
              return layer.cornerRadius
          }
      }
  }
  </code></pre>
  
  <p>2)And then I have set the custom class as "BorderTextView1" for the textview object in storyboard.</p>
  
  <p>3)so when I run the code, I am able to set the border for the textview in the attribute inspector,</p>
  
  <p>But still I am not able to view the border of Approver's Remarks textview in my simulator. Please provide a solution. </p>
  
  <p>I have attached the screenshot for the attribute inspector selection and the custom class setting.</p>
  
  <p>Setting the Custom class of TextView object</p>
  
  <p><img src="https://i.stack.imgur.com/4p5mg.png" alt="Setting the Custom class of TextView object"></p>
  
  <p>Setting the border colour for textview during Runtime</p>
  
  <p><img src="https://i.stack.imgur.com/boYb7.png" alt="Setting the border colour for textview during Runtime"></p>