使用pods 获取资源文件

NSURL *url = [[NSBundle mainBundle] URLForResource:@"BundleName" withExtension:@"bundle"];
NSBundle *resourceBundle = [NSBundle bundleWithURL:url];
NSString *configPath = [resourceBundle pathForResource:@"PlistName" ofType:@".plist"];

获取图片
NSURL *url = [[NSBundle mainBundle] URLForResource:@"BundleName" withExtension:@"bundle"];
NSBundle *resourceBundle = [NSBundle bundleWithURL:url];
UIImage *image = [UIImage imageNamed: imageName inBundle:resourceBundle compatibleWithTraitCollection:nil];

你可能感兴趣的:(使用pods 获取资源文件)