2016-11-14 41 views
0

我已经装入了一个BSBundle的定位是这样的:询问一个NSBundle其资源名称

NSURL *const bundleURL = [[NSBundle mainBundle] 
          URLForResource:localizationName 
          withExtension:@"lproj"]; 

NSBundle *const bundle = [NSBundle bundleWithURL:bundleURL]; 

...我怎么能(其他地方)通过发送消息给它回来从bundlelocalizationName

回答

0

基于this answer,这个工程:

[[bundle.bundleURL URLByDeletingPathExtension] lastPathComponent]