显示时UIAlertView动画滞后

时间:2014-05-15 10:44:38

标签: ios animation uialertview lag

每当我显示UIAlertView时,我在动画中遇到奇怪的延迟。警报视图上的按钮和标签在背景前显着出现。它在我显示警报的应用程序中随处可见

alert view lag

上面示例中的警报显示在清除按钮的操作方法中:

-(IBAction)clearButtonTapped:(id)sender {
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Clear Outbox" message:@"This will delete everything from your Outbox." delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK",nil];   
    [alert show];
}

有谁知道为什么会这样做/我能做些什么来阻止它?

2 个答案:

答案 0 :(得分:1)

在info.plist

中将“使用边缘抗锯齿渲染”设置为NO

答案 1 :(得分:0)

试试这个

[yourAlert performSelectorOnMainThread:@selector(show) withObject:nil waitUntilDone:NO];