From 656920acd3b4fdbd0dbc52b99b9640ca6e629726 Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Sat, 11 Apr 2015 19:41:10 +1200 Subject: [PATCH] Added support on constraint maker for iOS 8 properties --- Source/ConstraintMaker.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Source/ConstraintMaker.swift b/Source/ConstraintMaker.swift index ac08916..f713e70 100644 --- a/Source/ConstraintMaker.swift +++ b/Source/ConstraintMaker.swift @@ -43,6 +43,18 @@ final public class ConstraintMaker { public var centerY: Constraint { return self.addConstraint(ConstraintAttributes.CenterY) } public var baseline: Constraint { return self.addConstraint(ConstraintAttributes.Baseline) } + #if os(iOS) + public var firstBaseline: Constraint { return self.addConstraint(ConstraintAttributes.FirstBaseline) } + public var leftMargin: Constraint { return self.addConstraint(ConstraintAttributes.LeftMargin) } + public var rightMargin: Constraint { return self.addConstraint(ConstraintAttributes.RightMargin) } + public var topMargin: Constraint { return self.addConstraint(ConstraintAttributes.TopMargin) } + public var bottomMargin: Constraint { return self.addConstraint(ConstraintAttributes.BottomMargin) } + public var leadingMargin: Constraint { return self.addConstraint(ConstraintAttributes.LeadingMargin) } + public var trailingMargin: Constraint { return self.addConstraint(ConstraintAttributes.TrailingMargin) } + public var centerXWithinMargins: Constraint { return self.addConstraint(ConstraintAttributes.CenterXWithinMargins) } + public var centerYWithinMargins: Constraint { return self.addConstraint(ConstraintAttributes.CenterYWithinMargins) } + #endif + public var edges: Constraint { return self.addConstraint(ConstraintAttributes.Edges) } public var size: Constraint { return self.addConstraint(ConstraintAttributes.Size) } public var center: Constraint { return self.addConstraint(ConstraintAttributes.Center) }