Skip to content

A twitter-style pull-to-refresh NSScrollView with the added functionality of delegate protocols.

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE_PullToRefresh
MIT
LICENSE_ScrollToRefresh
Notifications You must be signed in to change notification settings

vincentmac/PullToRefresh

 
 

Repository files navigation

PullToRefresh

A twitter-style pull-to-refresh NSScrollView with the added functionality of delegate protocols.

A slightly modified version of: Leah Culver's PullToRefresh and Alex Zielenski's ScrollToRefresh

Key Features

  • Elastic Scroll
  • Added optional delegate protocol method: ptrScrollViewDidTriggerRefresh:(id)sender
    • This method gets called when the user scrolls beyond the set bounds.

Directions

  1. Link against the QuartzCore framework (under Targets > Build Phases > Link Binarry With Libraries).
  2. Copy the following files to your project:
  • PullToRefreshClipView.h/PullToRefreshClipView.m;
  • PullToRefreshScrollView.h/PullToRefreshScrollView.m;
  • PullToRefreshDelegate.h;
  • pull-to-refresh-arrow.png and;
  • release-to-refresh.png.
  1. Add a TableView or OutlineView from the Object Library to your nib file and subclass the ScrollView as a PullToRefreshScrollView.
  2. Create an outlet in your controller:
@property (weak) IBOutlet PullToRefreshScrollView *ptrScrollView;
  
  1. Set the delegate:
- (void)awakeFromNib {
    NSLog(@"awake from nib");
    [_ptrScrollView setDelegate:self];
  }
  
  1. Add the delegate method:
- (void)ptrScrollViewDidTriggerRefresh:(id)sender {
    NSLog(@"This is called by the PullToRefresh delegate protocol");
  }
  
  1. Customize the delegate method as needed.

License

PullToRefresh is forked from Alex Zielenski's ScrollToRefresh and is licensed under the MIT License. Please refer to the LICENSE for further details.

About

A twitter-style pull-to-refresh NSScrollView with the added functionality of delegate protocols.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE_PullToRefresh
MIT
LICENSE_ScrollToRefresh

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%