NSCurrentLocaleDidChangeNotification无法正常工作

时间:2016-07-18 10:54:54

标签: ios

 -(void)viewDidLoad {
        [[NSNotificationCenter defaultCenter] 
             addObserver:self selector:@selector(localeDidChange)
             name:NSCurrentLocaleDidChangeNotification object:nil]; 
 }

-(void)localeDidChange{

    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"ALERT"
                                                    message:@"languagechange"
                                                   delegate:self
                                          cancelButtonTitle:@"OK"
                                          otherButtonTitles:nil];
    [alert show];
    [self.view setBackgroundColor:[UIColor redColor]];

 }

我是从iphone设置更改区域但是localeDidChange方法永远不会被解雇请帮忙。

0 个答案:

没有答案
相关问题