gpt4 book ai didi

objective-c - 适用视单元图像

转载 作者:行者123 更新时间:2023-11-29 05:01:29 25 4
gpt4 key购买 nike

UIImageView *img=[[UIImageView alloc]initWithFrame:CGRectMake(50,50,145,20)];
img.image=[UIImage imageNamed:@"dollor.png"];

[cell.contentView addSubview:img];
[img release];

这段代码对吗???请帮忙我正在尝试将图像放置在 tableviewcell 中

最佳答案

简单地使用:

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

没有别的了。

关于objective-c - 适用视单元图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6814344/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com