The API allows setting horizontal insets for the accessory view that are different from the message. This is most often used for dialogs that have both a message and an accessory view, as demonstrated in the attached example.
Additionally, this example demonstrates how to add an horizontal hairline as shown on the material.io spec for Confirmation Dialogs.
Note:
This new API is needed because clients do not always have control over the view that is being used as an accessory view, or that the view is used in multiple areas in the app, and cannot be customized.
Additionally, there's no way currently to set 0 insets for the accessory view, while still keeping the 24 value insets for the message, which is a relatively common scenario.
PiperOrigin-RevId: 334142026
This example demonstrates adding a collection view as an accessory view of a Material alert. It also demonstrates adding a horizontal line above the actions, as shown on material.io's spec for Confirmation Dialogs. The line will be fixed to reach the edges of the dialogs in a followup PR (cl/331128888).
PiperOrigin-RevId: 333376220
* Moving attributed message example out from accessory view
examples into its own examples file.
* Fixing examples:
1. Using latest theming versions in examples.
2. Enabling dynamic type.
3. Renaming examples.
PiperOrigin-RevId: 319013022
Develop currently doesn't build in Xcode. One of the errors pertains to the use of UITextItemInteraction without availability checks.
PiperOrigin-RevId: 315491912
Fixing incorrect sizing of accessoryView after returning from 3D Touch
Subclassing UITextView and implementing `systemLayoutSizeFittingSize:` so the alert's accessory view will be sized correctly during layout.
PiperOrigin-RevId: 310577286
Adding examples for accessory view, including:
* A textfield accessory view. This example uses an accessory view with auto-layout.
* A default label with a button as an accessory view
* An accessory view with a label and a button subclasses. Using auto-layout.
PiperOrigin-RevId: 307889891