title: Swift IBInspectable didSet versus get/set
body: <p>I am relatively new to <code>IBDesignables</code> and <code>IBInspectable</code>'s and I noticed that a lot of tutorial use <code>IBInspectable</code> in this fashion.</p>
  
  <pre><code>@IBInspectable var buttonBorderWidth: CGFloat = 1.0 {
      didSet {
          updateView()
      }
  }
  
  func updateView() {
      // Usually there are more entries here for each IBInspectable
      self.layer.borderWidth = buttonBorderWidth
  }
  </code></pre>
  
  <p>But in some instances they use get and set like this for example</p>
  
  <pre><code>@IBInspectable
  var shadowOpacity: Float {
      get {
          return layer.shadowOpacity
      }
      set {
          layer.shadowOpacity = newValue
      }
  }
  </code></pre>
  
  <p>Can someone please explain: What is happening in each of these cases and how to choose which one to use?</p>