Authored by Lukas Stabe

add "make.attribute(...)"

... ... @@ -33,6 +33,12 @@
@property (nonatomic, strong, readonly) MASConstraint *baseline;
/**
* Returns a block which creates a new MASViewConstraint with the first item set
* to the makers associated view and the passed-in attribute
*/
@property (nonatomic, strong, readonly) MASConstraint *(^attribute)(NSLayoutAttribute attr);
/**
* Creates a MASCompositeConstraint with type MASCompositeConstraintTypeEdges
* which generates the appropriate MASViewConstraint children (top, left, bottom, right)
* with the first item set to the makers associated view
... ...
... ... @@ -105,6 +105,12 @@
return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBaseline];
}
- (MASConstraint *(^)(NSLayoutAttribute))attribute {
return ^(NSLayoutAttribute attr){
return [self addConstraintWithLayoutAttribute:attr];
};
}
#pragma mark - composite Attributes
... ...