how to remove subview siwft 5

Swift
yourView.removeFromSuperview()
Source

Also in Swift: