bundle中资源的路径转换

    NSMutableString *path2 = [NSMutableString stringWithString:[[NSBundle mainBundle] pathForResource:@"WBUserGuideImage" ofType:@"bundle"]];
    [path2 appendString:@"haha"];
    NSBundle *bundle = [NSBundle bundleWithPath:
                        [[NSBundle mainBundle] pathForResource:@"WBUserGuideImage" ofType:@"bundle"]];
    NSString *path = [bundle bundlePath];
    NSString *path1 = [bundle pathForResource:aGuideImgid ofType:nil inDirectory:@"imgs"];
    
    NSFileManager *fm = [NSFileManager defaultManager];
    BOOL isexist = [fm fileExistsAtPath:path1];
    return isexist;

你可能感兴趣的:(bundle中资源的路径转换)