Skip to content

Instantly share code, notes, and snippets.

@maddox
Created August 10, 2008 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maddox/4728 to your computer and use it in GitHub Desktop.
Save maddox/4728 to your computer and use it in GitHub Desktop.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MyIdentifier = @"MyIdentifier";
TweetCell *cell = (TweetCell *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil) {
cell = [[[TweetCell alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier] autorelease];
}
// SummizerAppDelegate *appDelegate = (SummizerAppDelegate *)[[UIApplication sharedApplication] delegate];
// cell.text = (NSString *)[self.jsonArray objectAtIndex:indexPath.row];
NSDictionary *tweet;
tweet = [self.jsonArray objectAtIndex:indexPath.row];
// NSDictionary *itemAtIndex = (NSDictionary *)[self.jsonArray objectAtIndex:indexPath.row];
[cell setData:tweet];
// [cell setText:[NSString stringWithFormat:@"@%@: %@", [tweet objectForKey:@"from_user"], [tweet objectForKey:@"text"]]];
// [cell setText:[appDelegate.trends objectAtIndex:indexPath.row]];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.lineBreakMode = UILineBreakModeWordWrap;
// Set up the cell
return cell;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment