当前位置: 动力学知识库 > 问答 > 编程问答 >

objective c - Tableviewcell image

问题描述:

UIImageView *img=[[UIImageView alloc]initWithFrame:CGRectMake(50,50,145,20)];

img.image=[UIImage imageNamed:@"dollor.png"];

[cell.contentView addSubview:img];

[img release];

Is this code right????

Please help

I'm trying to place an image in the tableviewcell

网友答案:

Simply use:

cell.imageView.image=[UIImage imageNamed:@"dollor.png"];

nothing else.

网友答案:
cell.imageView.frame=CGRectMake(5,5,145,25);

cell.imageView.image=[UIImage imageNamed:@"dollor.png"];
分享给朋友:
您可能感兴趣的文章:
随机阅读: