Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Sephiroth87/ODRefreshControl
A pull down to refresh control like the one in Apple's iOS6 Mail App
https://github.com/Sephiroth87/ODRefreshControl
Last synced: 3 months ago
JSON representation
A pull down to refresh control like the one in Apple's iOS6 Mail App
- Host: GitHub
- URL: https://github.com/Sephiroth87/ODRefreshControl
- Owner: Sephiroth87
- License: mit
- Created: 2012-07-04T09:22:14.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-01-25T04:30:28.000Z (almost 9 years ago)
- Last Synced: 2024-07-27T17:54:43.487Z (3 months ago)
- Language: Objective-C
- Homepage:
- Size: 1.14 MB
- Stars: 2,151
- Watchers: 106
- Forks: 386
- Open Issues: 33
-
Metadata Files:
- Readme: README.textile
- License: LICENSE.txt
Awesome Lists containing this project
README
__*Notice:* There's a new 2.0 branch where I updated the control for iOS7 plus I plan to do some interesting new features. If people could try it out so I can be sure I didn't break anything it'd be great, and report any issue you find, I'd really appreciate that :)
h1. ODRefreshControl
!http://www.orangeinaday.com/img/ODRefreshControl.jpg!
ODRefreshControl is a "pull down to refresh" control for UIScrollView, like the one Apple introduced in iOS6, but available to anyone from iOS4 and up.
h2. Installation
* Drag the @ODRefreshControl/ODRefreshControl@ folder into your project.
* Add the *QuartzCore* framework to your project.
* @#import "ODRefreshControl.h"@__*Important note if your project doesn't use ARC*: you must add the @-fobjc-arc@ compiler flag to @ODRefreshControl.m@ in Target Settings > Build Phases > Compile Sources.__
h2. Usage
(see sample Xcode project in @/Demo@)
h3. Adding a refresh control to your table view
ODRefreshControl *refreshControl = [[ODRefreshControl alloc] initInScrollView:self.scrollView];To know when the refresh operation has started, add an action method to the UIControlEventValueChanged event of the control
[refreshControl addTarget:self action:@selector(dropViewDidBeginRefreshing:) forControlEvents:UIControlEventValueChanged];If you’d like to programmatically start the refresh operation, use
[refreshControl beginRefreshing];Remember to tell the control when the refresh operation has ended
[refreshControl endRefreshing];h4. Customization
The @ODRefreshControl@ can be customized using the following properties:
@property (nonatomic, strong) UIColor *tintColor;
@property (nonatomic, assign) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
@property (nonatomic, strong) UIColor *activityIndicatorViewColor; // iOS5 or moreh2. Credits
ODRefreshControl is brought to you by "Fabio Ritrovato":http://orangeinaday.com and "contributors to the project":https://github.com/Sephiroth87/ODRefreshControl/contributors. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by "creating new issues":https://github.com/Sephiroth87/ODRefreshControl/issues/new. If you're using ODRefreshControl in your project, attribution would be nice.