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
-
Summary
SBULoading
Guide & Snippet
By default, background touch events for
SBULoading
are blocked.This section describes how to customize touch events
1. Implement
SBULoadingDataSource
First, implement the
shouldPassTouchHit(_:with)
ofSBULoadingDataSource
like 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
SBULoadingDataSource
Touch event customization is designed to set the
dataSource
for each ViewController.So when the
ViewController
is appeared or disappeared, call thedataSource
setting method.See the code below.
3. Setup
SBUViewControllerSet
Finally, set the customized
ViewController
forSBULoading
in the SBUControllerSetReference
Beta Was this translation helpful? Give feedback.
All reactions