iOS 程序内国际化的一些心得(2)

上一篇讲到 首先判断是否加载选择语言视图。

goon:

1,如果不显示语言选择视图,说明用户手机设置语言包含在app支持语言内或者用户已经设置过当前app显示语言。

调用block 

isshow(NO);

2,如果显示语言选择页面。

调用block

isshow(YES);

加载选择界面;

 1 - (void)loadLanguageChooseView
 2 {
 3     VShowSelectLanguageViewController *luage = [[VShowSelectLanguageViewController alloc] initWithResult:^(WhetherUserChoose type, NSString *userChooserLanuage)
 4                                                 {
 5                                                     switch (type) {
 6                                                         case userIsChoose:
 7                                                              [self reloadRootView];
 8                                                             break;
 9                                                         case userNotChoose:
10                                                             
11                                                             break;
12                                                             
13                                                         default:
14                                                             break;
15                                                     }
16                                                    
17                                                     
18                                                     
19                                                 }];
20     UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:luage];
21     self.window.rootViewController = nav;
22 
23 }

待续,下班明天接着搞。。。

原文地址:https://www.cnblogs.com/yunis/p/4165716.html