UITableView(InfiniteScrollConvenienceInterface)
@interface UITableView (InfiniteScrollConvenienceInterface)
Convenience interface for UIScrollView+InfiniteScroll category.
-
Setup infinite scroll handler
Declaration
Objective-C
- (void)addInfiniteScrollWithHandler: (nonnull void (^)(UITableView *_Nonnull))handler;
Swift
func addInfiniteScroll(handler: @escaping (UITableView) -> Void)
Parameters
handler
a handler block
-
Set a handler to be called to check if the infinite scroll should be shown
Declaration
Objective-C
- (void)setShouldShowInfiniteScrollHandler: (nonnull BOOL (^)(UITableView *_Nonnull))handler;
Swift
func setShouldShowInfiniteScrollHandler(_ handler: @escaping (UITableView) -> Bool)
Parameters
handler
a handler block
-
Finish infinite scroll animations
You must call this method from your infinite scroll handler to finish all animations properly and reset infinite scroll state
Declaration
Objective-C
- (void)finishInfiniteScrollWithCompletion: (nullable void (^)(UITableView *_Nonnull))handler;
Swift
func finishInfiniteScroll(completion handler: ((UITableView) -> Void)? = nil)
Parameters
handler
a completion block handler called when animation finished