From abde17e493928c9ed2fd09620a4f2c7d848658b5 Mon Sep 17 00:00:00 2001 From: Nobody Date: Thu, 28 May 2020 11:42:52 -0700 Subject: [PATCH] internal change PiperOrigin-RevId: 313628801 --- components/ActionSheet/src/MDCActionSheetController.m | 9 +++++++++ .../ActionSheet/src/MDCActionSheetControllerDelegate.h | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/components/ActionSheet/src/MDCActionSheetController.m b/components/ActionSheet/src/MDCActionSheetController.m index 76114fcb6ee..73ab1aa9742 100644 --- a/components/ActionSheet/src/MDCActionSheetController.m +++ b/components/ActionSheet/src/MDCActionSheetController.m @@ -373,6 +373,15 @@ - (UITableViewCell *)tableView:(UITableView *)tableView return cell; } +- (void)tableView:(UITableView *)tableView + willDisplayCell:(nonnull UITableViewCell *)cell + forRowAtIndexPath:(nonnull NSIndexPath *)indexPath { + if ([self.delegate respondsToSelector:@selector(actionSheetController: + willDisplayView:forRowAtIndexPath:)]) { + [self.delegate actionSheetController:self willDisplayView:cell forRowAtIndexPath:indexPath]; + } +} + - (void)setContentEdgeInsets:(UIEdgeInsets)contentEdgeInsets { if (UIEdgeInsetsEqualToEdgeInsets(_contentEdgeInsets, contentEdgeInsets)) { return; diff --git a/components/ActionSheet/src/MDCActionSheetControllerDelegate.h b/components/ActionSheet/src/MDCActionSheetControllerDelegate.h index b1f2582fc18..2ff4d884ab7 100644 --- a/components/ActionSheet/src/MDCActionSheetControllerDelegate.h +++ b/components/ActionSheet/src/MDCActionSheetControllerDelegate.h @@ -27,4 +27,11 @@ Tells the delegate that the action sheet was dismissed. */ - (void)actionSheetControllerDidDismiss:(nonnull MDCActionSheetController *)actionSheetController; + +/** + Tells the delegate that the action sheet will display a view. + */ +- (void)actionSheetController:(nonnull MDCActionSheetController *)actionSheetController + willDisplayView:(nonnull UIView *)view + forRowAtIndexPath:(nonnull NSIndexPath *)indexPath; @end