After updating your constraint:
[UIView animateWithDuration:0.5 animations:^{[self.view layoutIfNeeded];}];
Replace self.view
with a reference to the containing view.
More Related Contents:
- How to add constraints programmatically using Swift
- When can I activate/deactivate layout constraints?
- Using autolayout in a tableHeaderView
- Auto layout constraints issue on iOS7 in UITableViewCell
- With Auto Layout, how do I make a UIImageView’s size dynamic depending on the image?
- setNeedsLayout vs. setNeedsUpdateConstraints and layoutIfNeeded vs updateConstraintsIfNeeded
- UITableView within UIScrollView using autolayout
- How to add Equal Spacing and equal width for button in iOS Auto layout
- Autolayout: Add constraint to superview and not Top Layout Guide?
- Centering subview’s X in autolayout throws “not prepared for the constraint”
- Moving views with constraints
- UITextView that expands to text using auto layout
- Programmatically Add CenterX/CenterY Constraints
- Can I use autolayout to provide different constraints for landscape and portrait orientations?
- When should translatesAutoresizingMaskIntoConstraints be set to true?
- What is “Constrain to margin” in Storyboard in Xcode 6
- How to convert a UIView to an image
- How to Convert UIView to PDF within iOS?
- reloadData() of UITableView with Dynamic cell heights causes jumpy scrolling
- Is it possible for UIStackView to scroll?
- Load view from an external xib file in storyboard
- AutoLayout with hidden UIViews?
- Can UIView be copied?
- UIScrollView and Constraints
- How can I use Autolayout to set constraints on my UIScrollview?
- UITableView dynamic cell heights only correct after some scrolling
- How to apply blur to a UIView?
- On iOS, what are the differences between margins, edge insets, content insets, alignment rects, layout margins, anchors…?
- Autolayout problems with iOS8 with code that works fine on iOS7
- How to mimic Keyboard animation on iOS 7 to add “Done” button to numeric keyboard?