Created
January 14, 2014 03:34
-
-
Save tLewisII/8412594 to your computer and use it in GitHub Desktop.
Auto layout macros, for shortening auto layout code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define NSConstraintMake(item, itemAttribute, relation, otherItem, otherAttribute, multiplier, constant) \ | |
[NSLayoutConstraint constraintWithItem:item attribute:itemAttribute relatedBy:relatation toItem:otherItem attribute:otherAttribute multiplier:multiplier constant:constant] \ | |
#define kLeading NSLayoutAttributeLeading | |
#define kTrailing NSLayoutAttributeTrailing | |
#define kTop NSLayoutAttributeTop | |
#define kBottom NSLayoutAttributeBottom | |
#define kCenterX NSLayoutAttributeCenterX | |
#define kCenterY NSLayoutAttributeCenterY | |
#define kLeft NSLayoutAttributeLeft | |
#define kRight NSLayoutAttributeRight | |
#define kBaseline NSLayoutAttributeBaseline | |
#define kWidth NSLayoutAttributeWidth | |
#define kHeight NSLayoutAttributeHeight | |
#define kNot NSLayoutAttributeNotAnAttribute | |
#define kEqual NSLayoutRelationEqual | |
#define kGreaterThanOrEqual NSLayoutRelationGreaterThanOrEqual | |
#define kLessThanOrEqual NSLayoutRelationLessThanOrEqual |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment