mirror of
https://github.com/material-components/material-components-ios.git
synced 2026-02-20 08:27:32 +08:00
908 B
908 B
Touch forwarding
The flexible header allows you to forward touch events to the tracking scroll view. This provides the illusion that the flexible header is part of the tracking scroll view.
Starting touch forwarding
To start touch forwarding you must call forwardTouchEventsForView: with each view:
Swift
headerView.forwardTouchEvents(for: someContentView)
Objective-C
[headerView forwardTouchEventsForView:someContentView];
Stopping touch forwarding
To stop touch forwarding you must call forwardTouchEventsForView: with each view:
Swift
headerView.stopForwardingTouchEvents(for: someContentView)
Objective-C
[headerView stopForwardingTouchEventsForView:someContentView];