From bc21bc29d8aae02bdbf24efcb350b672e597d0d3 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Tue, 15 Nov 2016 01:25:23 -0500 Subject: [PATCH] Deprecate shouldAdjustAnchorPointOnGestureStart on all plans. Summary: Closes https://github.com/material-motion/family-direct-manipulation-swift/issues/28 Reviewers: markwei, O2 Material Motion, O4 Material Motion Apple platform reviewers Reviewed By: markwei, O2 Material Motion, O4 Material Motion Apple platform reviewers Tags: #material_motion Differential Revision: http://codereview.cc/D1909 --- src/Draggable.swift | 13 +++++++------ src/Pinchable.swift | 13 +++++++------ src/Rotatable.swift | 13 +++++++------ 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/Draggable.swift b/src/Draggable.swift index 02acdc1..40d3181 100644 --- a/src/Draggable.swift +++ b/src/Draggable.swift @@ -29,12 +29,6 @@ public final class Draggable: NSObject, Plan { /** The gesture recognizer whose events will be observed. */ public let panGestureRecognizer: UIPanGestureRecognizer - /** - Whether or not the target's anchorPoint should be modified each time the gesture recognizer - begins. - */ - public var shouldAdjustAnchorPointOnGestureStart = false - /** Creates a plan with a new pan gesture recognizer. */ public convenience override init() { self.init(withGestureRecognizer: UIPanGestureRecognizer()) @@ -57,6 +51,13 @@ public final class Draggable: NSObject, Plan { draggable.shouldAdjustAnchorPointOnGestureStart = shouldAdjustAnchorPointOnGestureStart return draggable } + + /** + Whether or not the target's anchorPoint should be modified each time the gesture recognizer + begins. + */ + @available(*, deprecated, message: "Emit a ChangeAnchorPoint plan instead. Deprecated in v1.1.0.") + public var shouldAdjustAnchorPointOnGestureStart = false } extension Draggable: Gesturable { diff --git a/src/Pinchable.swift b/src/Pinchable.swift index dcf174b..3d0dd49 100644 --- a/src/Pinchable.swift +++ b/src/Pinchable.swift @@ -30,12 +30,6 @@ public final class Pinchable: NSObject, Plan { /** The gesture recognizer whose events will be observed. */ public let pinchGestureRecognizer: UIPinchGestureRecognizer - /** - Whether or not the target's anchorPoint should be modified each time the gesture - recognizer begins. - */ - public var shouldAdjustAnchorPointOnGestureStart = true - /** Creates a plan with a new pinch gesture recognizer. */ public convenience override init() { self.init(withGestureRecognizer: UIPinchGestureRecognizer()) @@ -58,6 +52,13 @@ public final class Pinchable: NSObject, Plan { pinchable.shouldAdjustAnchorPointOnGestureStart = shouldAdjustAnchorPointOnGestureStart return pinchable } + + /** + Whether or not the target's anchorPoint should be modified each time the gesture recognizer + begins. + */ + @available(*, deprecated, message: "Emit a ChangeAnchorPoint plan instead. Deprecated in v1.1.0.") + public var shouldAdjustAnchorPointOnGestureStart = true } extension Pinchable: Gesturable { diff --git a/src/Rotatable.swift b/src/Rotatable.swift index 369ca08..fd6907a 100644 --- a/src/Rotatable.swift +++ b/src/Rotatable.swift @@ -29,12 +29,6 @@ public final class Rotatable: NSObject, Plan { /** The gesture recognizer whose events will be observed. */ public let rotationGestureRecognizer: UIRotationGestureRecognizer - /** - Whether or not the target's anchorPoint should be modified each time the gesture - recognizer begins. - */ - public var shouldAdjustAnchorPointOnGestureStart = true - /** Creates a plan with a new rotation gesture recognizer. */ public convenience override init() { self.init(withGestureRecognizer: UIRotationGestureRecognizer()) @@ -57,6 +51,13 @@ public final class Rotatable: NSObject, Plan { rotatable.shouldAdjustAnchorPointOnGestureStart = shouldAdjustAnchorPointOnGestureStart return rotatable } + + /** + Whether or not the target's anchorPoint should be modified each time the gesture recognizer + begins. + */ + @available(*, deprecated, message: "Emit a ChangeAnchorPoint plan instead. Deprecated in v1.1.0.") + public var shouldAdjustAnchorPointOnGestureStart = true } extension Rotatable: Gesturable {