These tests broke when upgrading to Xcode 15.0.1. We do not support this component anymore; UIMenu should be used instead.
PiperOrigin-RevId: 606824408
This function notifies MDCActionSheetController delegates that the (user-triggered) dismissal animation has completed and the action sheet is no longer on the screen.
PiperOrigin-RevId: 314974453
Currently MDCActionSheetController does not support having clients add an image to an action after it has been displayed. This commit showcases that is not supported via the snapshot test. This requires a change in the MDCActionSheetAction header to allow the image to be readwrite.
PiperOrigin-RevId: 309443045
We recommend using `initWithDefaults` and we should follow the recommendation. This change removes all usage of `init` within MDC components in order to let us remove that initializer from the public surface.
PiperOrigin-RevId: 302958447
Add `MDCActionSheetControllerDelegate` to `MDCActionSheetController` with `actionSheetControllerDidDismiss:` so users of the ActionSheet component can react to dismissal.
Fixes#9147
This adds the ability for MDCActionSheet to add dividers on a per action basis. The dividers are always represented above the action and respect the `contentInsets` property of the `MDCActionSheetController`.
Any update to the action before the `MDCActionSheetController` is presented will be displayed when presented. If an ActionSheetController is presented then this property is changed those changes will not be present. I've filed #9465 to track that work. I choose not to add this functionality since similar properties, (tintColor, titleColor, title, image) on MDCActionSheetAction also follow this pattern.
Closes#9331
Because inkColor and enableRippleBehavior no longer exist on MDCActionSheetController
and MDCActionSheetItemTableViewCell is private, these properties are unused and can safely be deleted. This change also properly marks MDCActionSheetItemTableViewCell's rippleColor as null_resettable.
Fixes#9239
MDCActionSheetController's inkColor and enableRippleBehavior properties are deprecated and have no internal usage. inkColor and enableRippleBehavior properties still exist in MDCActionSheetItemTableViewCell and will be deleted in a future PR.
Fixes#9128
Comparing a non-`UICIColor` (e.g., a `UIExtendedSRGBColorSpace` UIColor) with a `UICIColor` crashes with the message:
> error: -[MDCActionSheetTableCellTest testSetRippleColor] : failed: caught "NSInvalidArgumentException", "-[UICIColor colorSpaceName]: unrecognized selector sent to instance 0x7ff1c02595b0"
Because of this, and the fact that this check is likely an unnecessary optimization (and because `isEqual:` does not return YES for UIColors from different color spaces, even if they have the same RGBA values), this PR removes the equality check.
Fixes#9236
Refactor the edge insets API snapshot tests to have more reusable code.
This is a partial roll-forward of #9029. `imageEdgeInsets` was rolled-back and
so that part of the original PR is not part if this change.
Creates a new API to allow adjusting each action's image edge insets. Clients can now resize/position the action image's container view to adjust the layout of each action row. The image container view is part of the overall content container view, so adjustments to its size may affect the overall content size as well.
Part of #8709
Moves the `contentEdgeInsets` API snapshot tests to a separate file. The
upcoming APIs `titleEdgeInsets` and `imageEdgeInsets` will have their tests
added in the new file.
Follow-up from #9008
Part of #8709
This is the first of three APIs required to support customized action cell
layouts necessary for internal design guidelines. The `contentEdgeInsets` API
allows configuring the inset/outset values of the content rectangle of each
action cell.
Part of #8709
The `alwaysAlignTitleLeadingEdges` API was incorrectly functioning as a
one-way switch that only worked after actions were added. Instead, it should
work at any point and be able to be disabled.
Fixes#8609
This PR adds an API
*new property* `*headerDividerColor` on _MDCActionSheetController_
*new property* `*showHeaderDivider` on _MDCActionSheetController_
that will allow clients to add a divider to the action sheet between the header and the table. If a client wants to show a header divider they would need to set `showHeaderDivider` and then set an appropriate color for their use case, by default it is `clearColor`. By default the property `showHeaderDivider` view is `NO` so that we do not break clients. This matches a pattern outlined in [`MDCBannerView`](ac114b4bda/components/Banner/src/MDCBannerView.h (L76-L88)).
Closes#7395
This PR adds dark mode support to the theming extension for MDCActionSheetController. In order to support dark mode clients will need to set dynamic colors in their color scheme.
There is no change to `mdc_elevationDidChangeBlock` because the elevation on an MDCActionSheetController should never change since it is not a settable property. If we later expose a setter then we will need to add that functionality. Additionally unit test were added but since MDCActionSheetController doesn't allow for subclassing I could not test for traitCollection changes. In order to test this more thoroughly do the steps as follows.
1. Launch MDCCatalog on an iOS 13 simulator.
2. Open the ActionSheet example.
3. Switch between light and dark mode in Xcode 11.
Following the steps above, this should be the result.

Part of `testDefaultBackgroundColor` is failing because of XCode beta. Disable this test to make iOS13 bot happy.
Error description:
Setting `UIColor.white` as backgroundColor on a tableView causes `<UIDynamicSystemColor: 0x7fab88c49d50; name = tableBackgroundColor>` to be set in the end. It seems to be an XCode 11 beta issue.
Allows clients to customize the tint of individual actions. Currently MDCActionSheetController allows clients to customize the tint color on the controller itself but this allows for each action to have its own color. The controller will maintain its API so that clients can have a convenience of coloring all actions but also the ability to customize each individual action if that is what their design asks for.
Closes to #7549
Allows clients to customize the title of individual actions. Currently MDCActionSheetController allows clients to customize the title color on the controller itself but this allows for each action to have its own color. The controller will maintain its API so that clients can have a convenience of coloring all actions but also the ability to customize each individual action if that is what their design asks for.
Related to #7549
The action sheet needs an API so clients can hook-in to trait collection changes. This additionally passes the action sheet as a parameter so clients can modify the action sheet within the block.