Skip to content

Commit

Permalink
update examples to call [super updateConstraints] at end of implement…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
cloudkite committed Feb 13, 2014
1 parent a3028b4 commit 4bfa1b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Examples/Masonry iOS Examples/MASExampleArrayView.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@ - (void)setOffset:(CGFloat)offset {
}

- (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
4 changes: 3 additions & 1 deletion Examples/Masonry iOS Examples/MASExampleUpdateView.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ - (id)init {

// this is Apple's recommended place for adding/updating constraints
- (void)updateConstraints {
[super updateConstraints];

[self.growingButton updateConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(self);
Expand All @@ -48,6 +47,9 @@ - (void)updateConstraints {
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 {
Expand Down

0 comments on commit 4bfa1b3

Please sign in to comment.