-(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方法永远不会被解雇请帮忙。