开发者

How do I start an animation without canceling touches?

I have a UIView nested in a UIView. When I animate the 开发者_如何学Cframe and alpha of the inner view, touches in the outer view get canceled. Can I stop that from happening?


You can use block based animation methods.

[UIView animateWithDuration:1.0 
     delay:0.0 
     options:UIViewAnimationOptionAllowUserInteraction
                   | UIViewAnimationOptionCurveEaseInOut 
     animations:^{
          //your animation code
     } completion:^(BOOL finished){
          //your code when animation finished..
}];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜