I put a button in the corner of a sub view in the UIViewController. Now what I want is when the sub view increase its height, the button should be still at the corner. In the design I use autolayout as follow:
- sub view (left, top, width, height)
- button of the subview (left, bottom, right)
[UIView animateWithDuration:0.3 animations:^{ //- Increase the subview's height CGRect frame = _subview.frame; frame.size.height = frame.size.height + 100; _subview.frame = frame; //- Update constraints [_subview layoutIfNeeded]; }];
But the button is still the same position.