Created
January 14, 2012 21:19
-
-
Save samvermette/1612933 to your computer and use it in GitHub Desktop.
Revisions
-
samvermette revised this gist
Jan 14, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,13 @@ - (void)viewDidLoad { self.currentPage = 0; self.dataSource = [[NSMutableArray alloc] init]; } - (void)fetchData { [[SVHTTPClient sharedClient] GET:@"https://api.github.com/users/AndrewGertig/watched" parameters:[NSDictionary dictionaryWithValue:[NSNumber numberWithInt:self.currentPage] forKey:@"page"] completion:^(id response, NSError *error) { [self.dataSource addObjectsFromArray:response]; }]; } -
samvermette revised this gist
Jan 14, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,5 +13,5 @@ - (void)fetchData { // somewhere in your controller, user triggers the view of the next page self.currentPage++; [self fetchData]; -
samvermette renamed this gist
Jan 14, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
samvermette created this gist
Jan 14, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ - (void)viewDidLoad { self.currentPage = 0; } - (void)fetchData { [[SVHTTPClient sharedClient] GET:@"https://api.github.com/users/AndrewGertig/watched" parameters:[NSDictionary dictionaryWithValue:[NSNumber numberWithInt:self.currentPage] forKey:@"page"] completion:^(id response, NSError *error) { // do something with response }]; } // somewhere in your controller, user triggers the view of the next page currentPage++; [self fetchData];