Skip to content

Instantly share code, notes, and snippets.

View ninthspace's full-sized avatar

Chris Aves ninthspace

View GitHub Profile
@ninthspace
ninthspace / initSVPullToRefresh.m
Created April 26, 2012 15:20
UITableViewController initializer with support for SVPullToRefresh
- (id)init {
self = [super initWithStyle:UITableViewStyleGrouped];
if (self) {
// add the handler to the UITableView
[[self tableView] addPullToRefreshWithActionHandler:^{
// do something, in this case add a new item to our data source
[self addNewItem:nil];
// tell pull-to-refresh to stop animating
[[[self tableView] pullToRefreshView] stopAnimating];
}];
@ninthspace
ninthspace / init.m
Created April 26, 2012 15:17
Simple UITableViewController initializer
- (id)init {
self = [super initWithStyle:UITableViewStyleGrouped];
return self;
}