Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ios
/
Masonry
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Lukas Stabe
11 years ago
Commit
a8ca8beb6a86e98703f075047c9c976b351472d3
1 parent
38c135c2
add "make.attribute(...)"
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
Masonry/MASConstraintMaker.h
Masonry/MASConstraintMaker.m
Masonry/MASConstraintMaker.h
View file @
a8ca8be
...
...
@@ -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
...
...
Masonry/MASConstraintMaker.m
View file @
a8ca8be
...
...
@@ -105,6 +105,12 @@
return
[
self
addConstraintWithLayoutAttribute
:
NSLayoutAttributeBaseline
];
}
-
(
MASConstraint
*
(
^
)(
NSLayoutAttribute
))
attribute
{
return
^
(
NSLayoutAttribute
attr
){
return
[
self
addConstraintWithLayoutAttribute
:
attr
];
};
}
#pragma mark - composite Attributes
...
...
Please
register
or
login
to post a comment