title: How to use delete(_:) in Swift4 to Removes the selected content from your interface?
body: <p>I have created a view programmatically </p>
  
  <pre><code>let v = UIView.init()
  v.frame = CGRect(x:10, y:40, width:100, height:100)
  v.backgroundcolor = .blue
  view.addsubview(v)
  </code></pre>
  
  <p>to delete this view I used two different approaches</p>
  
  <pre><code>1:    v.ishidden = true
  2:    v.removefromsuperview()
  
  these two approaches don't completely erase v.frame &amp; v.backgroundcolor values from memory just object disappears
  </code></pre>
  
  <p>then I use delete(_:)</p>
  
  <pre><code>v.delete(self)
  </code></pre>
  
  <p>it's giving an error </p>
  
  <pre><code>Thread 1: signal SIGABRT
  </code></pre>
  
  <p>I think it's a syntax problem. how to use should I use it delete(_:)</p>
  
  <pre><code>optional func delete(_ sender: Any?)
  </code></pre>