I am trying to do something similar to twitter or Facebook.
- (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath
{
static NSString* CellIdentifier = @"Cell";
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
cell = [[[UITableViewCell alloc] UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
cell.textLabel.text = @"I'm a UITableViewCell!";
cell.imageView.image = [UIImage imageNamed:@"MyReallyCoolImage.png"];
return cell;
}
Credit to Thomas Moore
adding images to UItableView
Well, to add an image to a table cell, you would add a UIImage to the image property of a subtitle UITableViewCell or your own custom Cell. I would read the doc on Customizing UITableViewCells at developer.apple.com.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With