bundle中资源的路径转换

来源:互联网 发布:绘声绘影软件 编辑:程序博客网 时间:2024/06/05 15:01
    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;
原创粉丝点击