cci

CCInfiniteScrolling

These UIScrollView categories makes it super easy to add infinite scrolling functionalities to any UIScrollView (or any of its subclass)

Showing:

Popularity

Downloads/wk

0

GitHub Stars

45

Maintenance

Last Commit

5yrs ago

Contributors

3

Package

Dependencies

2

License

MIT

Categories

Readme

CCInfiniteScrolling

These UIScrollView categories makes it super easy to add infinite scrolling functionalities to any UIScrollView (or any of its' subclass). Instead of relying on delegates and/or subclassing UIViewController, CCInfiniteScrolling uses the Objective-C runtime to add the following 2 methods to UIScrollView:

- (void)addTopInfiniteScrollingWithActionHandler:(void (^)())actonHandler;
- (void)addBottomInfiniteScrollingWithActionHandler:(void (^)())actonHandler;

Installation

CocoaPods is the recommended way to add CCInfiniteScrolling to your project.

Here's an example podfile that installs CCInfiniteScrolling.

###Podfile

platform :ios, '6.0'

pod 'CCInfiniteScrolling'

Usage

(see sample Xcode project in /Example)

Adding Infinite Scrolling

[_tableView addBottomInfiniteScrollingWithActionHandler:^{
    //this block will be triggered when user has scrolled to bottom of tableview;
    //you can start "load more" request
    //simply call [_tableView reloadData] when your request finishes
    }];

You can temporarily disable the infinite scrolling view by setting the infiniteScrollingDisabled property:

tableView.infiniteScrollingDisabled = YES;

Customization

The infinite scrolling view can be customized using the following methods:

@property (nonatomic) IBOutlet UIView *infiniteScrollingCustomView;
@property (nonatomic) IBOutlet UIView *infiniteScrollingCustomFailedView;
+ (void)setInfinityScrollingCustomBlockFailedImage:(UIImage *)image;

@property (nonatomic) IBOutlet UIView *topInfiniteScrollingCustomView;
@property (nonatomic) IBOutlet UIView *bottomInfiniteScrollingCustomView;
@property (nonatomic) IBOutlet UIView *topInfiniteScrollingCustomFailedView;
@property (nonatomic) IBOutlet UIView *bottomInfiniteScrollingCustomFailedView;
@property (nonatomic) BOOL topInfiniteScrollingDisabled;
@property (nonatomic) BOOL bottomInfiniteScrollingDisabled;
@property (nonatomic) BOOL topInfiniteScrollingBlockFailed;
@property (nonatomic) BOOL bottomInfiniteScrollingBlockFailed;

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100