Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A pull down to refresh control like the one in Apple's iOS6 Mail App

License

NotificationsYou must be signed in to change notification settings

Sephiroth87/ODRefreshControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

__*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 :)

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.

Installation

  • Drag theODRefreshControl/ODRefreshControl folder into your project.
  • Add theQuartzCore framework to your project.
  • #import "ODRefreshControl.h"

Important note if your project doesn’t useARC: you must add the-fobjc-arc compiler flag toODRefreshControl.m in Target Settings > Build Phases > Compile Sources.

Usage

(see sample Xcode project in/Demo)

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];

Customization

TheODRefreshControl can be customized using the following properties:

@property (nonatomic, strong) UIColor *tintColor;@property (nonatomic, assign) UIActivityIndicatorViewStyle activityIndicatorViewStyle;@property (nonatomic, strong) UIColor *activityIndicatorViewColor; // iOS5 or more

Credits

ODRefreshControl is brought to you byFabio Ritrovato andcontributors to the project. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or bycreating new issues. If you’re using ODRefreshControl in your project, attribution would be nice.

About

A pull down to refresh control like the one in Apple's iOS6 Mail App

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp