Authored by Jonas Budelmann

Merge pull request #100 from kovpas/master

iOS example app code cleanup.
... ... @@ -60,9 +60,13 @@ static NSString * const kMASCellReuseIdentifier = @"kMASCellReuseIdentifier";
viewClass:MASExampleArrayView.class],
[[MASExampleViewController alloc] initWithTitle:@"Attribute Chaining"
viewClass:MASExampleAttributeChainingView.class],
[[MASExampleLayoutGuideViewController alloc] init],
];
if ([UIViewController instancesRespondToSelector:@selector(topLayoutGuide)])
{
self.exampleControllers = [self.exampleControllers arrayByAddingObject:[[MASExampleLayoutGuideViewController alloc] init]];
}
return self;
}
... ...
... ... @@ -33,12 +33,14 @@
self.topLeft = YES;
// make sure updateConstraints gets called
[self setNeedsUpdateConstraints];
return self;
}
+ (BOOL)requiresConstraintBasedLayout
{
return YES;
}
// this is Apple's recommended place for adding/updating constraints
- (void)updateConstraints {
... ...
... ... @@ -31,12 +31,14 @@
self.buttonSize = CGSizeMake(100, 100);
// make sure updateConstraints gets called
[self setNeedsUpdateConstraints];
return self;
}
+ (BOOL)requiresConstraintBasedLayout
{
return YES;
}
// this is Apple's recommended place for adding/updating constraints
- (void)updateConstraints {
... ...