Browse Source

update examples to call [super updateConstraints] at end of implementation

Jonas Budelmann 11 years ago
parent
commit
4bfa1b37a0

+ 3 - 1
Examples/Masonry iOS Examples/MASExampleArrayView.m

@@ -73,10 +73,12 @@ static CGFloat const kArrayExampleIncrement = 10.0;
 }
 
 - (void)updateConstraints {
-    [super updateConstraints];
     [self.buttonViews updateConstraints:^(MASConstraintMaker *make) {
         make.baseline.equalTo(self.mas_centerY).with.offset(self.offset);
     }];
+    
+    //according to apple super should be called at end of method
+    [super updateConstraints];
 }
 
 @end

+ 3 - 1
Examples/Masonry iOS Examples/MASExampleUpdateView.m

@@ -39,7 +39,6 @@
 
 // this is Apple's recommended place for adding/updating constraints
 - (void)updateConstraints {
-    [super updateConstraints];
 
     [self.growingButton updateConstraints:^(MASConstraintMaker *make) {
         make.center.equalTo(self);
@@ -48,6 +47,9 @@
         make.width.lessThanOrEqualTo(self);
         make.height.lessThanOrEqualTo(self);
     }];
+    
+    //according to apple super should be called at end of method
+    [super updateConstraints];
 }
 
 - (void)didTapGrowButton:(UIButton *)button {