读书人

bundle中资源的途径转换

发布时间: 2012-11-11 10:07:57 作者: rapoo

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;

读书人网 >移动开发

热点推荐