Skip to content

Commit

Permalink
Annotate various Delegate protocols as NS_SWIFT_UI_ACTOR
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 708413470
  • Loading branch information
Nobody authored and material-automation committed Dec 20, 2024
1 parent 554b1f5 commit 24a0ffb
Show file tree
Hide file tree
Showing 52 changed files with 52 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ API_DEPRECATED("🕘 Schedule time to migrate. "
"confirmations. "
"This is go/material-ios-migrations#not-scriptable 🕘",
ios(12, 12))
NS_SWIFT_UI_ACTOR
@protocol MDCActionSheetControllerDelegate <NSObject>
@optional

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/**
Delegate protocol for the MDCActivityIndicator.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCActivityIndicatorDelegate <NSObject>

@optional
Expand Down
1 change: 1 addition & 0 deletions components/AppBar/src/MDCAppBarNavigationController.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ API_DEPRECATED(
"Use branded UINavigationController instead: go/material-ios-top-app-bars/gm2-migration. "
"This is go/material-ios-migrations#not-scriptable 🕘",
ios(11, 12))
NS_SWIFT_UI_ACTOR
@protocol
MDCAppBarNavigationControllerDelegate <UINavigationControllerDelegate,
MDCAppBarNavigationControllerToBeDeprecatedDelegate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ API_DEPRECATED(
"Use branded UINavigationController instead: go/material-ios-top-app-bars/gm2-migration. "
"This is go/material-ios-migrations#not-scriptable 🕘",
ios(11, 12))
NS_SWIFT_UI_ACTOR
@protocol MDCAppBarNavigationControllerToBeDeprecatedDelegate <NSObject>
@optional

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ API_DEPRECATED(
"This is go/material-ios-migrations#not-scriptable 🕘",
ios(11, 12))
API_UNAVAILABLE(tvos, watchos)
NS_SWIFT_UI_ACTOR
@protocol MDCAppBarViewControllerAccessibilityPerformEscapeDelegate <NSObject>
@required

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
The protocol for clients of the MDCBottomNavigationBarController to conform to for updates on the
bottom navigation bar, manage selection, and other possible actions.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCBottomNavigationBarControllerDelegate <NSObject>
@optional
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
Delegate protocol for MDCBottomNavigationBar. Clients may implement this protocol to receive
notifications of selection changes by user action in the bottom navigation bar.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCBottomNavigationBarDelegate <UINavigationBarDelegate>

@optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/**
Delegate for MDCBottomSheetController.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCBottomSheetControllerDelegate <NSObject>
@optional
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ typedef NS_ENUM(NSUInteger, MDCSheetState);
/**
Delegate for MDCBottomSheetPresentationController.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCBottomSheetPresentationControllerDelegate <UIAdaptivePresentationControllerDelegate>
@optional

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/**
Methods for managing lifecycle events of an @c MDCBottomSheetTransitionController.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCBottomSheetTransitionControllerDelegate <NSObject>
@optional
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/**
* Delegate protocol to control when dragging should be allowed and to respond to dragging events.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCDraggableViewDelegate <NSObject>

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ typedef NS_ENUM(NSUInteger, MDCSheetState);

NS_ASSUME_NONNULL_BEGIN

NS_SWIFT_UI_ACTOR
@protocol MDCSheetContainerViewDelegate <NSObject>

- (void)sheetContainerViewDidHide:(MDCSheetContainerView *)containerView;
Expand Down
1 change: 1 addition & 0 deletions components/ButtonBar/src/MDCButtonBarDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ API_DEPRECATED_BEGIN(
@seealso MDCBarButtonItemLayoutHints
*/
NS_SWIFT_UI_ACTOR
@protocol MDCButtonBarDelegate <NSObject>
@optional

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ API_DEPRECATED_BEGIN("🤖👀 Use branded M3CButton instead. "
/**
MDCFloatingButtonModeAnimator uses this delegate to interact with its owning context.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCFloatingButtonModeAnimatorDelegate <NSObject>
@required

Expand Down
1 change: 1 addition & 0 deletions components/Chips/src/MDCChipField.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
MDCChipFieldVerticalInset, MDCChipFieldHorizontalInset, MDCChipFieldVerticalInset,
MDCChipFieldHorizontalInset};

NS_SWIFT_UI_ACTOR
@protocol MDCChipFieldTextFieldDelegate <NSObject>

- (void)textFieldDidDelete:(UITextField *)textField;
Expand Down
1 change: 1 addition & 0 deletions components/Chips/src/MDCChipFieldDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

NS_SWIFT_UI_ACTOR
@protocol MDCChipFieldDelegate <NSObject>

@optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ API_DEPRECATED_BEGIN("🕘 Schedule time to migrate. "
- Individual cells being swiped horizontally for dismissal.
- Entire cell sections being swiped horizontally for dismissal.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCCollectionViewEditingDelegate <NSObject>

@optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ API_DEPRECATED_BEGIN("🕘 Schedule time to migrate. "
@class MDCRippleView;

/** A delegate protocol which allows setting collection view cell styles. */
NS_SWIFT_UI_ACTOR
@protocol MDCCollectionViewStylingDelegate <NSObject>
@optional

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ API_DEPRECATED_BEGIN("🕘 Schedule time to migrate. "

@class MDCCollectionInfoBarView;

NS_SWIFT_UI_ACTOR
@protocol MDCCollectionInfoBarViewDelegate <NSObject>
@required
/**
Expand Down
1 change: 1 addition & 0 deletions components/Dialogs/src/MDCAlertControllerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
@class MDCAlertAction;
@class MDCAlertController;

NS_SWIFT_UI_ACTOR
@protocol MDCAlertControllerDelegate <NSObject>

@optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
MDCDialogPresentationControllerDelegate provides a method that allows a delegate of an
MDCDialogPresentationController to respond to its dismissals.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCDialogPresentationControllerDelegate <NSObject>
@optional
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ API_DEPRECATED_BEGIN("Use a branded UINavigationController instead.", ios(12, AP
An object may conform to this protocol in order to receive animation events caused by a
MDCFlexibleHeaderView.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCFlexibleHeaderViewAnimationDelegate <NSObject>
@optional

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ API_DEPRECATED_BEGIN("Use a branded UINavigationController instead.", ios(12, AP
The delegate is typically the UIViewController that owns this flexible header view.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCFlexibleHeaderViewDelegate <NSObject>
@required

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ API_DEPRECATED_BEGIN("Use a branded UINavigationController instead.", ios(12, AP
An object may conform to this protocol in order to receive layout change events caused by a
MDCFlexibleHeaderView.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCFlexibleHeaderViewLayoutDelegate <NSObject>
@required

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ @protocol MDCFlexibleHeaderHairlineViewDelegate;
@property(nonatomic, weak) id<MDCFlexibleHeaderHairlineViewDelegate> delegate;
@end

NS_SWIFT_UI_ACTOR
@protocol MDCFlexibleHeaderHairlineViewDelegate <NSObject>
@required

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ API_DEPRECATED_BEGIN("Use a branded UINavigationController instead.", ios(12, AP
The delegate protocol through which MDCFlexibleHeaderMinMaxHeight communicates changes in the
minimum and maximum height.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCFlexibleHeaderMinMaxHeightDelegate <NSObject>
@required

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ API_DEPRECATED_BEGIN("Use a branded UINavigationController instead.", ios(12, AP
The MDCStatusBarShifterDelegate protocol allows a delegate to react to changes in the status bar
shifter's state.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCStatusBarShifterDelegate <NSObject>
@required

Expand Down
1 change: 1 addition & 0 deletions components/Ink/src/MDCInkTouchControllerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ API_DEPRECATED_BEGIN(
@class MDCInkTouchController;
@class MDCInkView;

NS_SWIFT_UI_ACTOR
@protocol MDCInkTouchControllerDelegate <NSObject>
@optional

Expand Down
1 change: 1 addition & 0 deletions components/Ink/src/private/MDCInkLayerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ API_DEPRECATED_BEGIN(
Delegate protocol for the MDCInkLayer. Clients may implement this protocol to receive updates when
ink layer animations start and end.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCInkLayerDelegate <CALayerDelegate>

@optional
Expand Down
1 change: 1 addition & 0 deletions components/Ink/src/private/MDCLegacyInkLayerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Delegate protocol for the MDCLegacyInkLayer. Clients may implement this protocol to receive updates
when ink layer animations start and end.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCLegacyInkLayerDelegate <NSObject>

@optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ API_DEPRECATED_BEGIN(

@class MDCLegacyInkLayerRipple;

NS_SWIFT_UI_ACTOR
@protocol MDCLegacyInkLayerRippleDelegate <MDCLegacyInkLayerDelegate>

/// Called if MDCLegacyInkLayerRipple did start animating.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/**
Delegate for MDCBottomSheetPresentationController.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCBottomDrawerPresentationControllerDelegate <UIAdaptivePresentationControllerDelegate>
/**
This method is called when the bottom drawer will change its presented state to one of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/**
Delegate for MDCBottomDrawerViewController.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCBottomDrawerViewControllerDelegate <NSObject>

@optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/**
Delegate for MDCBottomDrawerContainerViewController.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCBottomDrawerContainerViewControllerDelegate <NSObject>

/**
Expand Down
1 change: 1 addition & 0 deletions components/Ripple/src/MDCRippleTouchControllerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ API_DEPRECATED_BEGIN(
/**
Delegate methods for MDCRippleTouchController.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCRippleTouchControllerDelegate <NSObject>
@optional

Expand Down
1 change: 1 addition & 0 deletions components/Ripple/src/MDCRippleViewDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ API_DEPRECATED_BEGIN(
The ripple view delegate protocol. Clients may implement this protocol to receive updates on
the ripple's animation lifecycle.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCRippleViewDelegate <NSObject>

@optional
Expand Down
1 change: 1 addition & 0 deletions components/Ripple/src/private/MDCRippleLayerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
The ripple layer delegate protocol to let MDCRippleView know of the layer's
ripple animation timeline.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCRippleLayerDelegate <CALayerDelegate>

/**
Expand Down
1 change: 1 addition & 0 deletions components/Slider/src/MDCSliderDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ API_DEPRECATED_BEGIN("🤖👀 Use go/material-ios-branding UISlider instead. "

@class MDCSlider;

NS_SWIFT_UI_ACTOR
@protocol MDCSliderDelegate <NSObject>
@optional

Expand Down
1 change: 1 addition & 0 deletions components/Snackbar/src/MDCSnackbarManagerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Delegate protocol for the MDCSnackbarManager.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCSnackbarManagerDelegate <NSObject>

/**
Expand Down
1 change: 1 addition & 0 deletions components/Tabs/src/MDCTabBarControllerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ API_DEPRECATED_BEGIN("🤖👀 Use a branded MDCTabBarView instead. "

@class MDCTabBarViewController;

NS_SWIFT_UI_ACTOR
@protocol MDCTabBarControllerDelegate <NSObject>
@optional

Expand Down
1 change: 1 addition & 0 deletions components/Tabs/src/MDCTabBarDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ API_DEPRECATED_BEGIN("🤖👀 Use a branded MDCTabBarView instead. "
Delegate protocol for MDCTabBar. Clients may implement this protocol to receive notifications of
selection changes in the tab bar or to determine the bar's position.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCTabBarDelegate <UIBarPositioningDelegate>

@optional
Expand Down
1 change: 1 addition & 0 deletions components/Tabs/src/TabBarView/MDCTabBarViewDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Methods for notification and control of selection events for @c MDCTabBarView.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCTabBarViewDelegate <NSObject>

@optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ typedef NS_ENUM(NSUInteger, MDCTabBarViewItemViewStyle) {
MDCTabBarViewItemViewStyleTextAndImage = 2,
};

NS_SWIFT_UI_ACTOR
@protocol MDCTabBarViewItemViewDelegate <NSObject>

/* Minimum item width*/
Expand Down
1 change: 1 addition & 0 deletions components/Tabs/src/private/MDCItemBarDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Delegate protocol for MDCItemBar. Clients may implement this protocol to receive notifications of
selection changes.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCItemBarDelegate <NSObject>
/**
Called before the selected item changes by user action. This method is not called for programmatic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ API_DEPRECATED_BEGIN(
This delegate protocol for @c MDCBaseTextArea and its subclasses provides updates about the text
area unrelated to the text area's contained @c textView.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCBaseTextAreaDelegate <NSObject>

@optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ API_DEPRECATED_BEGIN(
This protocol allows the MDCBaseTextAreaTextView to inform the text area of important responder
events.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCBaseTextAreaTextViewDelegate <NSObject>

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ API_DEPRECATED_BEGIN(
This delegate protocol for @c MDCBaseTextField and its subclasses provides updates not already
covered by @c UITextFieldDelegate.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCBaseTextFieldDelegate <NSObject>

@optional
Expand Down
1 change: 1 addition & 0 deletions components/TextFields/src/MDCMultilineTextInputDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ API_DEPRECATED_BEGIN(
MDCMultilineTextInputDelegate has a method common to the UITextFieldDelegate protocol but not
found in UITextViewDelegate.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCMultilineTextInputDelegate <NSObject>

@optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ API_DEPRECATED_BEGIN(
"This is go/material-ios-migrations#not-scriptable 🕘",
ios(12, 12))

NS_SWIFT_UI_ACTOR
@protocol MDCMultilineTextInputLayoutDelegate <NSObject>

@optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ API_DEPRECATED_BEGIN(
Usually, these methods are direct mirrors of internal methods with the addition of a default value.
*/
NS_SWIFT_UI_ACTOR
@protocol MDCTextInputPositioningDelegate <NSObject>

@optional
Expand Down
Loading

0 comments on commit 24a0ffb

Please sign in to comment.