Created
October 18, 2014 04:18
-
-
Save mmesarina/cbf4c4c9b2cb15d5ca97 to your computer and use it in GitHub Desktop.
RottenTomatoes cellForRowAtIndex code
This file contains 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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
NSLog(@"Number of Movies = %lu", (unsigned long)self.movies.count); | |
// Configure the cell... | |
//UITableViewCell *cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil | |
MovieCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyMovieCell"]; | |
NSDictionary *movie = self.movies[indexPath.row]; | |
cell.movieTitleLabel.text = movie[@"title"]; | |
cell.synopsisLabel.text = movie[@"synopsis"]; | |
NSDictionary *posters = movie[@"posters"]; | |
NSString *posterUrlString = posters[@"detailed"]; | |
[cell.posterView setImageWithURL:[NSURL URLWithString:posterUrlString]]; | |
return cell; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment