首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

bundle中资源的途径转换

2012-11-11 
bundle中资源的路径转换NSMutableString *path2 [NSMutableString stringWithString:[[NSBundle mainBun

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;

热点排行