how to remove subview from view in swift code example Example: how to remove subview siwft 5 yourView.removeFromSuperview()