I have the following view with the following constraints:
@IBOutlet weak var square1ViewOutlet: UIView!
Which is inserted inside the following view using the storyboard:
@IBOutlet weak var holderView: UIView!
My problem is that I am not being able to override the positioning of square1ViewOutlet
established by the storyboard. The following code does not have any effect. I've tried some variations as bellow, but nothing works and the view is really stuck to previous storyboard constraints. I am calling this with my viewDidLoad method.
square1ViewOutlet.frame.origin.y = self.holderView.frame.origin.y + 20
square1ViewOutlet.frame.origin.x = self.holderView.frame.origin.x + 20
square1ViewOutlet.frame = CGRectOffset(CGRect(origin: square1ViewOutlet.frame.origin, size: square1ViewOutlet.frame.size), 20, 20)
square1ViewOutlet.center = CGPointMake(150, 150)
square1ViewOutlet.frame = CGRectMake( 100, 200, square1ViewOutlet.frame.size.width, square1ViewOutlet.frame.size.height )
Any idea what am I doing wrong here?