gpt4 book ai didi

iphone - 这个初始化有什么问题

转载 作者:行者123 更新时间:2023-12-03 21:07:15 26 4
gpt4 key购买 nike

我想在像这样的路径中加载带有图像的uimage

/var/mobile/Applications/429E283A-6E89-4BCE-861F-252C5327F711/图书馆/应用程序支持/学生/43y。 F./1.2.840.113564.3.1.2.180.0.0.90.20081228203734483950/1.2.840.113564.10.1.226230117146661685815524478531105858244/缩略图.b议员

我使用了以下代码

UIImage* theImage = [UIImage imageNamed:ThumbnailPath];

if (theImage !=nil) {

cell.imageView.image = theImage;

}
else {

NSLog(@"Error");
}

其中 ThumbnailPath 是路径但 uiimage 总是为零,并且我确信该文件存在,任何人都可以帮我修复它

最诚挚的问候

最佳答案

UIImage* theImage = [UIImage imageWithContentsOfFile:ThumbnailPath];

if (theImage !=nil) {

cell.imageView.image = theImage;

}
else {

NSLog(@"Error");
}

希望这有帮助

关于iphone - 这个初始化有什么问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5879685/

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