在异步操作中,如果直接Show一个UIAlertView可能会造成屏幕闪烁(目前在iPhone5上发现),解决办法如下:

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示"
message:msg
delegate:self
cancelButtonTitle:@"取消"
otherButtonTitles:@"确定",nil];
//在主线程中打开
[alert performSelectorOnMainThread:@selector(show) withObject:nil waitUntilDone:YES];
05-06 16:09