Authored by Pavel Mazurin

Fix build for previous sdk versions

@@ -162,7 +162,7 @@ @@ -162,7 +162,7 @@
162 } 162 }
163 } 163 }
164 164
165 -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0 165 +#if defined(__IPHONE_8_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
166 - (void)activate 166 - (void)activate
167 { 167 {
168 for (MASConstraint *constraint in self.childConstraints) { 168 for (MASConstraint *constraint in self.childConstraints) {
@@ -182,7 +182,7 @@ @@ -182,7 +182,7 @@
182 */ 182 */
183 - (void)uninstall; 183 - (void)uninstall;
184 184
185 -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0 185 +#if defined(__IPHONE_8_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
186 /** 186 /**
187 * Activates an NSLayoutConstraint. 187 * Activates an NSLayoutConstraint.
188 */ 188 */
@@ -238,7 +238,7 @@ @@ -238,7 +238,7 @@
238 238
239 - (void)uninstall { MASMethodNotImplemented(); } 239 - (void)uninstall { MASMethodNotImplemented(); }
240 240
241 -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0 241 +#if defined(__IPHONE_8_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
242 - (void)activate { MASMethodNotImplemented(); } 242 - (void)activate { MASMethodNotImplemented(); }
243 243
244 - (void)deactivate { MASMethodNotImplemented(); } 244 - (void)deactivate { MASMethodNotImplemented(); }
@@ -354,7 +354,7 @@ static char kInstalledConstraintsKey; @@ -354,7 +354,7 @@ static char kInstalledConstraintsKey;
354 [self.firstViewAttribute.view.mas_installedConstraints removeObject:self]; 354 [self.firstViewAttribute.view.mas_installedConstraints removeObject:self];
355 } 355 }
356 356
357 -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0 357 +#if defined(__IPHONE_8_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
358 - (void)activate 358 - (void)activate
359 { 359 {
360 NSAssert(self.hasBeenInstalled, @"Can't activate constraint that is not installed yet."); 360 NSAssert(self.hasBeenInstalled, @"Can't activate constraint that is not installed yet.");
@@ -152,7 +152,7 @@ SpecBegin(MASCompositeConstraint) { @@ -152,7 +152,7 @@ SpecBegin(MASCompositeConstraint) {
152 expect(superview.constraints).to.haveCountOf(0); 152 expect(superview.constraints).to.haveCountOf(0);
153 } 153 }
154 154
155 -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0 155 +#if defined(__IPHONE_8_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
156 - (void)testActivateDeactivate 156 - (void)testActivateDeactivate
157 { 157 {
158 NSArray *children = @[ 158 NSArray *children = @[
@@ -509,7 +509,7 @@ SpecBegin(MASViewConstraint) { @@ -509,7 +509,7 @@ SpecBegin(MASViewConstraint) {
509 expect(superview.constraints).to.haveCountOf(0); 509 expect(superview.constraints).to.haveCountOf(0);
510 } 510 }
511 511
512 -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0 512 +#if defined(__IPHONE_8_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
513 - (void)testDeactivateConstraint { 513 - (void)testDeactivateConstraint {
514 MASViewAttribute *secondViewAttribute = otherView.mas_height; 514 MASViewAttribute *secondViewAttribute = otherView.mas_height;
515 constraint.equalTo(secondViewAttribute); 515 constraint.equalTo(secondViewAttribute);