I want to add sub view and remove with one tap. This is my code:
/* To add subview */
var testView: UIView = UIView(frame: CGRectMake(0, 0, 320, 56
Tested this code using XCode 8 and Swift 3
To Add Custom View to SuperView use:
self.view.addSubview(myView)
To Remove Custom View from Superview use:
self.view.willRemoveSubview(myView)