Created
November 4, 2017 11:36
-
-
Save cockscomb/5c93d6d8cd47087255690340cee377bf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/SelfSizingAutoLayoutCell/SelfSizingAutoLayoutCell.m b/SelfSizingAutoLayoutCell/SelfSizingAutoLayoutCell.m | |
index 0acbbe5..db816f3 100644 | |
--- a/SelfSizingAutoLayoutCell/SelfSizingAutoLayoutCell.m | |
+++ b/SelfSizingAutoLayoutCell/SelfSizingAutoLayoutCell.m | |
@@ -47,7 +47,9 @@ NS_ASSUME_NONNULL_BEGIN | |
[constraints addObject:[autolayoutView.topAnchor constraintEqualToAnchor:self.contentView.topAnchor constant:10.0]]; | |
[constraints addObject:[autolayoutView.leadingAnchor constraintEqualToAnchor:self.contentView.leadingAnchor constant:10.0]]; | |
[constraints addObject:[self.contentView.trailingAnchor constraintEqualToAnchor:autolayoutView.trailingAnchor constant:10.0]]; | |
- [constraints addObject:[self.contentView.bottomAnchor constraintEqualToAnchor:autolayoutView.bottomAnchor constant:10.0]]; | |
+ NSLayoutConstraint *constraint = [self.contentView.bottomAnchor constraintEqualToAnchor:autolayoutView.bottomAnchor constant:10.0]; | |
+ constraint.priority = 999; | |
+ [constraints addObject:constraint]; | |
[NSLayoutConstraint activateConstraints:constraints]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment