Authored by Pavel Mazurin

Remove ifdefs. Update codestyle.

@@ -109,12 +109,10 @@ static char kInstalledConstraintsKey; @@ -109,12 +109,10 @@ static char kInstalledConstraintsKey;
109 109
110 - (BOOL)isActive { 110 - (BOOL)isActive {
111 BOOL active = YES; 111 BOOL active = YES;
112 -#ifdef __IPHONE_8_0  
113 - if ([self supportsActiveProperty])  
114 - { 112 + if ([self supportsActiveProperty]) {
115 active = [self.layoutConstraint isActive]; 113 active = [self.layoutConstraint isActive];
116 } 114 }
117 -#endif 115 +
118 return active; 116 return active;
119 } 117 }
120 118
@@ -289,28 +287,22 @@ static char kInstalledConstraintsKey; @@ -289,28 +287,22 @@ static char kInstalledConstraintsKey;
289 #pragma mark - MASConstraint 287 #pragma mark - MASConstraint
290 288
291 - (void)activate { 289 - (void)activate {
292 -#if defined(__IPHONE_8_0)  
293 if ([self supportsActiveProperty] && self.layoutConstraint) { 290 if ([self supportsActiveProperty] && self.layoutConstraint) {
294 if (self.hasBeenInstalled) { 291 if (self.hasBeenInstalled) {
295 return; 292 return;
296 } 293 }
297 self.layoutConstraint.active = YES; 294 self.layoutConstraint.active = YES;
298 [self.firstViewAttribute.view.mas_installedConstraints addObject:self]; 295 [self.firstViewAttribute.view.mas_installedConstraints addObject:self];
299 - } else  
300 -#endif  
301 - { 296 + } else {
302 [self install]; 297 [self install];
303 } 298 }
304 } 299 }
305 300
306 - (void)deactivate { 301 - (void)deactivate {
307 -#if defined(__IPHONE_8_0)  
308 if ([self.layoutConstraint respondsToSelector:@selector(setActive:)]) { 302 if ([self.layoutConstraint respondsToSelector:@selector(setActive:)]) {
309 self.layoutConstraint.active = NO; 303 self.layoutConstraint.active = NO;
310 [self.firstViewAttribute.view.mas_installedConstraints removeObject:self]; 304 [self.firstViewAttribute.view.mas_installedConstraints removeObject:self];
311 - } else  
312 -#endif  
313 - { 305 + } else {
314 [self uninstall]; 306 [self uninstall];
315 } 307 }
316 } 308 }
@@ -152,8 +152,7 @@ SpecBegin(MASCompositeConstraint) { @@ -152,8 +152,7 @@ SpecBegin(MASCompositeConstraint) {
152 expect(superview.constraints).to.haveCountOf(0); 152 expect(superview.constraints).to.haveCountOf(0);
153 } 153 }
154 154
155 -- (void)testActivateDeactivate  
156 -{ 155 +- (void)testActivateDeactivate {
157 NSArray *children = @[ 156 NSArray *children = @[
158 [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_leading], 157 [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_leading],
159 [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_trailing] 158 [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_trailing]