下面是我正在做的事情,当我使用包中的路径创建一个镜像时:
UIImage *image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image" ofType:@"jpg"]];
我想要做的是尝试找到我的图像的路径,但不使用扩展名,不使用'ofType‘(因为我的图像的名称和她的扩展名存储在我的数据库中):
UIImage *image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image.jpg"]];
但我不知道该怎么做。
诚挚的问候,
https://stackoverflow.com/questions/1984572
复制相似问题