mirror of
https://github.com/material-components/material-components-ios.git
synced 2026-02-20 08:27:32 +08:00
This is a complete overhaul of the App Bar documentation, fully reflecting the most modern set of APIs that we encourage and expect clients to adopt. As part of this work, I've also written up the documentation for the various behavioral flags. Preview the App Bar docs:007a738fa5/components/AppBar/README.mdPreview the Flexible Header docs:007a738fa5/components/FlexibleHeader/README.mdCloses https://github.com/material-components/material-components-ios/issues/4653
1.0 KiB
1.0 KiB
Interactive background views
Scenario: you've added a background image to your App Bar and you'd now like to be able to tap the background image.
This is not trivial to do with the App Bar APIs due to considerations being discussed in Issue #184.
The heart of the limitation is that we're using a view (headerStackView) to lay out the Navigation
Bar. If you add a background view behind the headerStackView instance then headerStackView will
end up eating all of your touch events.
Until Issue #184 is resolved, our recommendation for building interactive background views is the following:
- Do not use the App Bar component.
- Create your own Flexible Header. Learn more by reading the Flexible Header Usage docs.
- Add your views to this flexible header instance.
- Create a Navigation Bar if you need one. Treat it like any other custom view.