当我调用animateWithDuration时,app开始忽略用户交互事件:delay:options:animations:completion:

Dar*_*lay 0 iphone core-animation ios4 objective-c-blocks ios5

我有一个按钮,在我的应用程序(UIButton的子类)中发光.要为发光设置动画,请使用以下方法

- (void)glow
{

    [UIView animateWithDuration:1.0f 
                          delay:0.0f 
                        options:UIViewAnimationOptionCurveEaseInOut 
                     animations:^(void){

                         if (glowingImageView_.alpha != 1.0f) {
                             [glowingImageView_ setAlpha:1.0f];
                         }
                         else {
                             [glowingImageView_ setAlpha:0.3f];
                         }

                     } 
                     completion:^(BOOL finnished){

                         if (on_) {
                             [self glow];
                         }

                     }];

}
Run Code Online (Sandbox Code Playgroud)

它在iOS 5上运行良好,但在iOS 4.3中我的应用程序停止处理任何用户交互.任何人都知道可能导致这种情况的原因是什么?

谢谢

Ric*_*III 6

根据UIView文件:

在动画期间,对于要动画的视图,临时禁用用户交互.(在iOS 5之前,对整个应用程序禁用用户交互.)如果希望用户能够与视图交互,请UIViewAnimationOptionAllowUserInteraction在options参数中包含常量.

因此,在iOS 4.3中,禁用了用户交互.那是你的问题.