Browse Source

Update README.md

Jonas Budelmann 11 năm trước cách đây
mục cha
commit
10253750e9
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      README.md

+ 3 - 3
README.md

@@ -256,8 +256,6 @@ Alternatively if you are only updating the constant value of the constraint you
 // this method can get called multiple times in response to setNeedsUpdateConstraints
 // which can be called by UIKit internally or in your code if you need to trigger an update to your constraints
 - (void)updateConstraints {
-    [super updateConstraints];
-
     [self.growingButton mas_updateConstraints:^(MASConstraintMaker *make) {
         make.center.equalTo(self);
         make.width.equalTo(@(self.buttonSize.width)).priorityLow();
@@ -265,7 +263,9 @@ Alternatively if you are only updating the constant value of the constraint you
         make.width.lessThanOrEqualTo(self);
         make.height.lessThanOrEqualTo(self);
     }];
-}
+    
+    //according to apple super should be called at end of method
+    [super updateConstraints];
 ```
 
 ### 3. mas_remakeConstraints