Authored by Pavel Mazurin

Fix build for previous sdk versions

... ... @@ -162,7 +162,7 @@
}
}
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0
#if defined(__IPHONE_8_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
- (void)activate
{
for (MASConstraint *constraint in self.childConstraints) {
... ...
... ... @@ -182,7 +182,7 @@
*/
- (void)uninstall;
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0
#if defined(__IPHONE_8_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
/**
* Activates an NSLayoutConstraint.
*/
... ...
... ... @@ -238,7 +238,7 @@
- (void)uninstall { MASMethodNotImplemented(); }
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0
#if defined(__IPHONE_8_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
- (void)activate { MASMethodNotImplemented(); }
- (void)deactivate { MASMethodNotImplemented(); }
... ...
... ... @@ -354,7 +354,7 @@ static char kInstalledConstraintsKey;
[self.firstViewAttribute.view.mas_installedConstraints removeObject:self];
}
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0
#if defined(__IPHONE_8_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
- (void)activate
{
NSAssert(self.hasBeenInstalled, @"Can't activate constraint that is not installed yet.");
... ...
... ... @@ -152,7 +152,7 @@ SpecBegin(MASCompositeConstraint) {
expect(superview.constraints).to.haveCountOf(0);
}
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0
#if defined(__IPHONE_8_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
- (void)testActivateDeactivate
{
NSArray *children = @[
... ...
... ... @@ -509,7 +509,7 @@ SpecBegin(MASViewConstraint) {
expect(superview.constraints).to.haveCountOf(0);
}
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0
#if defined(__IPHONE_8_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
- (void)testDeactivateConstraint {
MASViewAttribute *secondViewAttribute = otherView.mas_height;
constraint.equalTo(secondViewAttribute);
... ...