I have this subview I want to add to my main view, but make it expand from the origin. I read some of the Apple documentation but I don\'t understand where I am making mistake.
Swift 4
UIView.animate(withDuration: 0.3, animations: { self.whiteBackgroundView.transform = CGAffineTransform(scaleX: 0.1, y: 0.1) self.view.layoutIfNeeded() }) { (finished) in // end of animation }