Reputation: 349
hi am doing an iphone twitter app with json and i am wondering if it is possible to set the cell.accessoryType to a image in UITableView? or possible move the image to the right hand side...any clues?
Upvotes: 0
Views: 5378
Reputation: 8347
No need to use imageview, just provide this for simple arrow.
cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
Upvotes: 2
Reputation: 9999
Sure. Just use the accessoryView
property of UITableViewCell and assign a UIImageView
:
UIImage *image = [UIImage imageNamed:@"fileNameOfYourImage.jpg"]; //or wherever you take your image from
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
cell.accessoryView = imageView;
[imageView release];
Upvotes: 3