当UIAlertView存在时,没有动画的方向给出奇怪的结果 [英] Orientation without animation giving weird result when UIAlertView is present
问题描述
我在这里面临一个奇怪的问题。
I am facing a weird problem here.
出于某种原因,我在视图控制器中使用 [UIView]在方向更改期间禁用动画setAnimationsEnabled:NO];
但是当警报视图存在且我改变了方向时,它会产生奇怪的结果。
For some reason I am disabling the animation during orientation change in my view controller using [UIView setAnimationsEnabled:NO];
But when the alert view is present and if I change the orientation then it is giving weird result.
附加的屏幕截图是我将方向更改为横向时。
The attached screen shot is when I change the orientation to landscape.
请注意:我使用的是标准 UIAlertView
,它是默认覆盖,当警报视图出现时显示,此处不涉及自定义。
Please note: I am using standard UIAlertView
and it is default overlay which is shown when the alert view is present and there is no customisation involved here.
根据文档
如果禁用动画,后续动画块中的代码仍会执行但没有动画实际发生。因此,您在动画块中所做的任何更改都会立即反映而不是动画。
所以它不应该影响默认值的大小调整覆盖。 这是禁用动画的限制!??
So it should not affect the resizing of the default overlay. Is it a restriction in disabling animation !??
我不明白我为什么会这样。
任何人都可以帮忙解决这个问题。
I am not understanding why I am getting like this. Could anyone please help in solving this.
推荐答案
这似乎是 <$ c中的错误$ c> iOS6 及以下内容已在 iOS7
中修复。
This seems to be a bug in iOS6
and below and is fixed in iOS7
.
这篇关于当UIAlertView存在时,没有动画的方向给出奇怪的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!