From 62e4f2529ea9bd33af2ee5b511af4262c69d39ca Mon Sep 17 00:00:00 2001 From: Cody Weaver Date: Tue, 28 Jun 2022 10:36:19 -0700 Subject: [PATCH] [Ripple] Annotate symbols as to be deprecated PiperOrigin-RevId: 457767173 --- components/Ripple/src/MDCRippleTouchController.h | 6 ++++++ components/Ripple/src/MDCRippleTouchControllerDelegate.h | 6 ++++++ components/Ripple/src/MDCRippleView.h | 6 ++++++ components/Ripple/src/MDCRippleViewDelegate.h | 6 ++++++ components/Ripple/src/MDCStatefulRippleView.h | 9 ++++++++- 5 files changed, 32 insertions(+), 1 deletion(-) diff --git a/components/Ripple/src/MDCRippleTouchController.h b/components/Ripple/src/MDCRippleTouchController.h index 2995a079b50..9b1ea12e097 100644 --- a/components/Ripple/src/MDCRippleTouchController.h +++ b/components/Ripple/src/MDCRippleTouchController.h @@ -14,6 +14,10 @@ #import +API_DEPRECATED_BEGIN("Follow go/material-ios-touch-response, touch response should use system " + "highlighting behavior.", + ios(12, API_TO_BE_DEPRECATED)) + // TODO(b/151929968): Delete import of delegate headers when client code has been migrated to no // longer import delegates as transitive dependencies. #import "MDCRippleTouchControllerDelegate.h" @@ -111,3 +115,5 @@ - (void)addRippleToView:(nonnull UIView *)view; @end + +API_DEPRECATED_END diff --git a/components/Ripple/src/MDCRippleTouchControllerDelegate.h b/components/Ripple/src/MDCRippleTouchControllerDelegate.h index b0d40a963c0..5cdde5eaa44 100644 --- a/components/Ripple/src/MDCRippleTouchControllerDelegate.h +++ b/components/Ripple/src/MDCRippleTouchControllerDelegate.h @@ -14,6 +14,10 @@ #import +API_DEPRECATED_BEGIN("Follow go/material-ios-touch-response, touch response should use system " + "highlighting behavior.", + ios(12, API_TO_BE_DEPRECATED)) + @class MDCRippleTouchController; @class MDCRippleView; @@ -85,3 +89,5 @@ rippleViewAtTouchLocation:(CGPoint)location; @end + +API_DEPRECATED_END diff --git a/components/Ripple/src/MDCRippleView.h b/components/Ripple/src/MDCRippleView.h index f4837ea54ca..79fbbc1ec7d 100644 --- a/components/Ripple/src/MDCRippleView.h +++ b/components/Ripple/src/MDCRippleView.h @@ -14,6 +14,10 @@ #import +API_DEPRECATED_BEGIN("Follow go/material-ios-touch-response, touch response should use system " + "highlighting behavior.", + ios(12, API_TO_BE_DEPRECATED)) + // TODO(b/151929968): Delete import of delegate headers when client code has been migrated to no // longer import delegates as transitive dependencies. #import "MDCRippleViewDelegate.h" @@ -168,3 +172,5 @@ typedef NS_ENUM(NSInteger, MDCRippleStyle) { + (nonnull MDCRippleView *)injectedRippleViewForView:(nonnull UIView *)view; @end + +API_DEPRECATED_END diff --git a/components/Ripple/src/MDCRippleViewDelegate.h b/components/Ripple/src/MDCRippleViewDelegate.h index 7952b406d1c..2fa2fb2c07b 100644 --- a/components/Ripple/src/MDCRippleViewDelegate.h +++ b/components/Ripple/src/MDCRippleViewDelegate.h @@ -14,6 +14,10 @@ #import +API_DEPRECATED_BEGIN("Follow go/material-ios-touch-response, touch response should use system " + "highlighting behavior.", + ios(12, API_TO_BE_DEPRECATED)) + @class MDCRippleView; /** @@ -53,3 +57,5 @@ - (void)rippleTouchUpAnimationDidEnd:(nonnull MDCRippleView *)rippleView; @end + +API_DEPRECATED_END diff --git a/components/Ripple/src/MDCStatefulRippleView.h b/components/Ripple/src/MDCStatefulRippleView.h index 354517e1dbc..3612fdaa9dd 100644 --- a/components/Ripple/src/MDCStatefulRippleView.h +++ b/components/Ripple/src/MDCStatefulRippleView.h @@ -14,6 +14,10 @@ #import "MDCRippleView.h" +API_DEPRECATED_BEGIN("Follow go/material-ios-touch-response, touch response should use system " + "highlighting behavior.", + ios(12, API_TO_BE_DEPRECATED)) + /** Provides the current state of the ripple. The ripple is either in its normal state, or in the selected state where the ripple remains spread on the view. @@ -45,7 +49,8 @@ typedef NS_OPTIONS(NSInteger, MDCRippleState) { should be used when one wants to leverage the Material state system and should ideally be configured/set alongside the UIKit APIs (i.e. UIControlState or cell's setSelected/setHighlighted). */ -__attribute__((objc_subclassing_restricted)) @interface MDCStatefulRippleView : MDCRippleView +__attribute__((objc_subclassing_restricted)) +@interface MDCStatefulRippleView : MDCRippleView /** This BOOL is set to YES if the ripple is currently selected, or NO otherwise. @@ -163,3 +168,5 @@ __attribute__((objc_subclassing_restricted)) @interface MDCStatefulRippleView : - (void)touchesCancelled:(nullable NSSet *)touches withEvent:(nullable UIEvent *)event; @end + +API_DEPRECATED_END