Skip to content

iOS pull to refresh for UIScrollView, UITableView and UICollectionView

License

Notifications You must be signed in to change notification settings

Lapinou42/LGRefreshView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LGRefreshView

iOS pull to refresh for UIScrollView, UITableView and UICollectionView.

Preview

Installation

With source code

With CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. See the "Get Started" section for more details.

Podfile

platform :ios, '6.0'
pod 'LGRefreshView', '~> 1.0.0'

Usage

In the source files where you need to use the library, import the header file:

#import "LGRefreshView.h"

Initialization

You have several methods for initialization:

- (instancetype)initWithScrollView:(UIScrollView *)scrollView; // also you can pass UITableView and UICollectionView, becose its subclasses of UIScrollView

More init methods you can find in LGRefreshView.h

Handle actions

To handle actions you can use initialization methods with blocks or delegate, or implement it after initialization.

Delegate

@property (assign, nonatomic) id<LGRefreshViewDelegate> delegate;

- (void)refreshViewRefreshing:(LGRefreshView *)refreshView;

Blocks

@property (strong, nonatomic) void (^refreshHandler)(LGRefreshView *refreshView);

Notifications

Here is also some notifications, that you can add to NSNotificationsCenter:

kLGRefreshViewBeginRefreshingNotification;
kLGRefreshViewEndRefreshingNotification;

More

For more details try Xcode Demo project and see LGRefreshView.h

License

LGRefreshView is released under the MIT license. See LICENSE for details.

About

iOS pull to refresh for UIScrollView, UITableView and UICollectionView

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 98.3%
  • Ruby 1.5%
  • Shell 0.2%