开发者

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 cl开发者_C百科ues?


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];


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

cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜