我试图在UITesting时获取图像的路径。我已经尝试了多种方法,如下所示,但没有一种起作用?
图像文件的名称为:TestImage.fff
NSBundle* testBundle = [NSBundle bundleForClass: [self class]];
NSString* testImage = [testBundle pathForResource:@"TestImage.fff" ofType:@"fff"];
NSString* testImage2 = [testBundle pathForImageResource:@"TestImage"];
NSURL* testImage3 = [testBundle URLForResource:@"TestImage" withExtension:@"fff"];
有人可以告诉我我要去哪里错吗?