Created
December 5, 2012 23:49
-
-
Save kiero/4220589 to your computer and use it in GitHub Desktop.
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 characters
| -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |
| if (self.dealsVC == nil) { | |
| DealsTableViewController *aDealVC = [[DealsTableViewController alloc] init]; | |
| self.dealsVC = aDealVC; | |
| [aDealVC release]; | |
| } | |
| City *city = [self.cities objectAtIndex:indexPath.row]; | |
| self.dealsVC.navigationItem.title = city.name; | |
| NSLog(@"Slug name: %@", city.nameSlug); | |
| JSONConnection *jsonConnection = [[JSONConnection alloc] init]; | |
| [jsonConnection fetchDealsFromCity:city.nameSlug withDelegate:self.dealsVC]; | |
| [self.navigationController pushViewController:self.dealsVC animated:YES]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment