获取bundle文件下的资源

NSBundle* bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle].resourcePath stringByAppendingPathComponent:@"bundleName"]];

    UIImage* img = [UIImage imageWithContentsOfFile:[bundle pathForResource:imageName ofType:@"png" inDirectory:[NSString stringWithFormat:@"文件名称%@",externPath]]];

原文地址:https://www.cnblogs.com/Xujg/p/5468462.html