i have trouble with setNeedsDisplay. I have an UIView with a lot of sub UIViews, created in Inteface Builder. I have also an Button with IBAction. In this IBAction i want to
Swift 2
This is a replica of Nick Lockwood's answer for some easy copy paste
let parent = self.view.superview self.view.removeFromSuperview() self.view = nil parent?.addSubview(self.view)