I have a UIView inside a UIViewm and I want the inner UIView to be always centered inside the outer one, without it having to resize t
UIView
I would use:
self.childView.center = CGPointMake(CGRectGetMidX(self.parentView.bounds), CGRectGetMidY(self.parentView.bounds));
I like to use the CGRect options...
CGRect
SWIFT 3:
self.childView.center = CGPoint(x: self.parentView.bounds.midX, y: self.parentView.bounds.midY);