本文介绍了“具有边缘抗锯齿的渲染器"指的是具有边缘抗锯齿的渲染器.导致iOS 7中的UIAlertView延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自iOS 7以来,我注意到我的UIAlertViews显示有某种绘制延迟-发生的是屏幕变暗,UIAlertView的文本在屏幕上仅显示了一秒钟,然后才显示警报视图的实际帧.

Ever since iOS 7, I noticed my UIAlertViews show with a sort of drawing delay- what happens is the screen dims and the UIAlertView's text appears on the screen for just a split second before the actual frame of the alert view appears.

我将问题归结为是由于我的应用程序plist文件中的具有边缘抗锯齿效果的渲染"标志设置为YES所致.禁用此功能可以解决此问题(但是,在所有旋转的视图上我都遇到了锯齿状的锯齿,这是我最初使用该标志解决的问题).

I traced the problem to being due to the "Renders with edge antialiasing" flag set to YES in my application plist file. Turning this off solves the problem (but then I have ugly jaggies on any rotated views, which is what I was using that flag to solve in the first place).

有人知道我也可以吃蛋糕吗?即具有边缘抗锯齿功能和平滑的UIAlertViews.

Anyone know how I can have my cake and eat it too? i.e. have edge antialiasing as well as smooth UIAlertViews.

在较高的层次上,似乎能够即时切换'UIViewEdgeAntialiasing'都能做到.或者,如果有一种方法可以直接使用抗锯齿旋转UIViews.这两种可能吗?

On a high level, it seems as though either being able to toggle 'UIViewEdgeAntialiasing' on the fly would do it. Or if there is a way to rotate UIViews with antialiasing directly. Are either of these possible?

推荐答案

带有边缘抗锯齿的渲染"非常昂贵!请谨慎使用.

"Renders with edge antialiasing" is very expensive! Use with caution.

使用此小技巧:

    view.layer.borderWidth = 1;
    view.layer.borderColor = [UIColor clearColor].CGColor;
    view.layer.rasterizationScale = [UIScreen mainScreen].scale;
    view.layer.shouldRasterize = YES;

这篇关于“具有边缘抗锯齿的渲染器"指的是具有边缘抗锯齿的渲染器.导致iOS 7中的UIAlertView延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 13:06