From f5511c3bacfa5061514e775d0280b99de900b6c0 Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Thu, 4 Aug 2016 10:57:23 +1200 Subject: [PATCH] Add in existing update functions and deprecate them --- Source/Constraint.swift | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Source/Constraint.swift b/Source/Constraint.swift index eb6387a..310c8e2 100644 --- a/Source/Constraint.swift +++ b/Source/Constraint.swift @@ -104,6 +104,27 @@ public class Constraint { return self } + @available(*, deprecated:0.40.0, message:"Use update(offset: ConstraintOffsetTarget) instead.") + public func updateOffset(amount: ConstraintOffsetTarget) -> Void { self.update(offset: amount) } + + @available(*, deprecated:0.40.0, message:"Use update(inset: ConstraintInsetTarget) instead.") + public func updateInsets(amount: ConstraintInsetTarget) -> Void { self.update(inset: amount) } + + @available(*, deprecated:0.40.0, message:"Use update(priority: ConstraintPriorityTarget) instead.") + public func updatePriority(amount: ConstraintPriorityTarget) -> Void { self.update(priority: amount) } + + @available(*, obsoleted:0.40.0, message:"Use update(priority: ConstraintPriorityTarget) instead.") + public func updatePriorityRequired() -> Void {} + + @available(*, obsoleted:0.40.0, message:"Use update(priority: ConstraintPriorityTarget) instead.") + public func updatePriorityHigh() -> Void { fatalError("Must be implemented by Concrete subclass.") } + + @available(*, obsoleted:0.40.0, message:"Use update(priority: ConstraintPriorityTarget) instead.") + public func updatePriorityMedium() -> Void { fatalError("Must be implemented by Concrete subclass.") } + + @available(*, obsoleted:0.40.0, message:"Use update(priority: ConstraintPriorityTarget) instead.") + public func updatePriorityLow() -> Void { fatalError("Must be implemented by Concrete subclass.") } + // MARK: Internal internal func updateConstantAndPriorityIfNeeded() {