initWithNibName始终加载英语xib [英] initWithNibName always loads English xib
本文介绍了initWithNibName始终加载英语xib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有英语和es本地化版本的本地化AboutApp.xib文件,但是即使我将手机的语言设置为西班牙语,该文件也始终会加载英语版本.如何根据语言加载西班牙语版本?
I have a localized AboutApp.xib file with English and es localized versions, but it always loads the English version even when I have the phone's language set to Spanish. How do I get it to load the Spanish version based on the language?
// Make sure AboutApp View is allocated
if (self.aboutAppController == nil) {
AboutApp* aboutApp =
[[AboutApp alloc] initWithNibName:@"AboutApp" bundle:nil];
self.aboutAppController = aboutApp;
[aboutApp release];
}
[UIView beginAnimations: nil context: nil];
[UIView setAnimationDuration: 1.0f];
[UIView setAnimationTransition: UIViewAnimationTransitionCurlUp
forView: [self.view window] cache: YES];
[self presentModalViewController: self.aboutAppController animated: YES];
[UIView commitAnimations];
推荐答案
我发现在macrumors上回答论坛.只需执行一次Build Clean并对其进行重建,以识别XIB的本地化即可.
I found the answer on macrumors forum. Just needed to do a Build Clean and a rebuild for it to recognize the localization of the xib.
这篇关于initWithNibName始终加载英语xib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文