Browse Source

Fixing Code Formatting

Daniel Hammond 11 years ago
parent
commit
9fba10f3da
3 changed files with 9 additions and 17 deletions
  1. 6 12
      Examples/Masonry iOS Examples/MASExampleArrayView.m
  2. 2 4
      Masonry/NSArray+MASAdditions.m
  3. 1 1
      README.md

+ 6 - 12
Examples/Masonry iOS Examples/MASExampleArrayView.m

@@ -19,8 +19,7 @@ static CGFloat const kArrayExampleIncrement = 10.0;
 
 @implementation MASExampleArrayView
 
-- (id)init
-{
+- (id)init {
     self = [super init];
     if (!self) return nil;
     
@@ -56,29 +55,24 @@ static CGFloat const kArrayExampleIncrement = 10.0;
     return self;
 }
 
-- (void)centerAction
-{
+- (void)centerAction {
     self.offset = 0.0;
 }
 
-- (void)raiseAction
-{
+- (void)raiseAction {
     self.offset -= kArrayExampleIncrement;
 }
 
-- (void)lowerAction
-{
+- (void)lowerAction {
     self.offset += kArrayExampleIncrement;
 }
 
-- (void)setOffset:(CGFloat)offset
-{
+- (void)setOffset:(CGFloat)offset {
     _offset = offset;
     [self setNeedsUpdateConstraints];
 }
 
-- (void)updateConstraints
-{
+- (void)updateConstraints {
     [super updateConstraints];
     [self.buttonViews updateConstraints:^(MASConstraintMaker *make) {
         make.baseline.equalTo(self.mas_centerY).with.offset(self.offset);

+ 2 - 4
Masonry/NSArray+MASAdditions.m

@@ -11,8 +11,7 @@
 
 @implementation NSArray (MASAdditions)
 
-- (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block
-{
+- (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block {
     NSMutableArray *constraints = [NSMutableArray array];
     for (UIView *view in self) {
         NSAssert([view isKindOfClass:[UIView class]], @"All objects in the array must be views");
@@ -21,8 +20,7 @@
     return constraints;
 }
 
-- (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block
-{
+- (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block {
     NSMutableArray *constraints = [NSMutableArray array];
     for (UIView *view in self) {
         NSAssert([view isKindOfClass:[UIView class]], @"All objects in the array must be views");

+ 1 - 1
README.md

@@ -7,7 +7,7 @@ For examples take a look at the **Masonry iOS Examples** project in the Masonry
 
 ## Whats wrong with NSLayoutConstraints?
 
-Under the hood Auto Layout is a powerful and flexible way of organizing and laying out your views. However creating constraints from code is verbose and not very descriptive.
+Under the hood Auto Layout is a powerful and flexible way of organising and laying out your views. However creating constraints from code is verbose and not very descriptive.
 Imagine a simple example in which you want to have a view fill its superview but inset by 10 pixels on every side
 ```obj-c
 UIView *superview = self;