Explorar o código

Merge pull request #93 from ryanmaxwell/master

Update example to show more features
Jonas Budelmann %!s(int64=11) %!d(string=hai) anos
pai
achega
2603e9ed5e
Modificáronse 1 ficheiros con 3 adicións e 6 borrados
  1. 3 6
      README.md

+ 3 - 6
README.md

@@ -277,15 +277,12 @@ Alternatively if you are only updating the constant value of the constraint you
 ```obj-c
 - (void)changeButtonPosition {
     [self.button mas_remakeConstraints:^(MASConstraintMaker *make) {
-        make.width.equalTo(@(self.buttonSize.width));
-        make.height.equalTo(@(self.buttonSize.height));
+        make.size.equalTo(self.buttonSize);
         
         if (topLeft) {
-        	make.top.equalTo(@10);
-        	make.left.equalTo(@10);
+        	make.top.and.left.offset(10);
         } else {
-        	make.bottom.equalTo(self.view.mas_bottom).with.offset(-10);
-        	make.right.equalTo(self.view.mas_right).with.offset(-10);
+        	make.bottom.and.right.offset(-10);
         }
     }];
 }