gpt4 book ai didi

iphone - 将图像分配给 UIImageView 对象后如何刷新 View ?

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:48:36 26 4
gpt4 key购买 nike

<分区>

当有人点击按钮时,我有一个 UIImageView 导出,具体取决于他们点击的按钮。这是我的代码:

UIImage *img = [[UIImage alloc] initWithData:image];
self.imgToDisplay = [[UIImageView alloc]initWithImage:img];
// I try to use this to see the image:
[self.imgToDisplay setNeedsDisplay];

但是没用。有谁知道如何在我的 UIImageView 上显示图像?

非常感谢您的帮助。

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