2016-11-14 43 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]