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
handlera 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
handlera 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
handlera completion block handler called when animation finished
View on GitHub
UITableView(InfiniteScrollConvenienceInterface) Category Reference