How to custom background touch event for SBULoading? #91
damon-v2
announced in
8. Commons
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
SBULoadingGuide & Snippet
By default, background touch events for
SBULoadingare blocked.This section describes how to customize touch events
1. Implement
SBULoadingDataSourceFirst, implement the
shouldPassTouchHit(_:with)ofSBULoadingDataSourcelike the example belowThe boolean in the return value indicates whether it passed.
If false, the touch is ignored; if true, the touch event is passed to the next view's event chaining.
2. Set & Remove
SBULoadingDataSourceTouch event customization is designed to set the
dataSourcefor each ViewController.So when the
ViewControlleris appeared or disappeared, call thedataSourcesetting method.See the code below.
3. Setup
SBUViewControllerSetFinally, set the customized
ViewControllerforSBULoadingin the SBUControllerSetReference
Beta Was this translation helpful? Give feedback.
All reactions