user629283
user629283

Reputation: 349

iphone: customise cell.accessoryType

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

Answers (2)

Gaurav Taywade
Gaurav Taywade

Reputation: 8347

No need to use imageview, just provide this for simple arrow.

cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;

Upvotes: 2

Björn Marschollek
Björn Marschollek

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

Related Questions