add image to uitableview cell

前端 未结 7 1255

I have a tableview, how can I add image to the left of this cells?

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-30 10:48

    Try this code:--

    UIImageView *imv = [[UIImageView alloc]initWithFrame:CGRectMake(3,2, 20, 25)];
    imv.image=[UIImage imageNamed:@"arrow2.png"];
    [cell addSubview:imv];
    [imv release];
    

提交回复
热议问题