当我使用包中的路径创建图像时,这就是我正在做的事情:
UIImage *image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image" ofType:@"jpg"]];
Run Code Online (Sandbox Code Playgroud)
我想要做的是尝试找到我的图像的路径,但不使用扩展名,而不使用'ofType'(因为我的图像的名称和她的扩展名存储在我的数据库中)类似的东西:
UIImage *image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image.jpg"]];
Run Code Online (Sandbox Code Playgroud)
但我不知道该怎么做.
最好的祝福,