您的位置:首页 > 产品设计 > UI/UE

[UIView animationWithDuration:animations:]使用的注意点

2013-05-08 16:11 274 查看
apple官方文档:

在动画的过程中,UIView上的控件事件是无法响应的, ios5以前,app中所有控件都无法响应的

如果要能接受事件,需要包含UIViewAnimationOptionAllowUserInteraction 这个属性

This method performs the specified animations immediately using the UIViewAnimationOptionCurveEaseInOutand UIViewAnimationOptionTransitionNone animation options.

During an animation, user interactions are temporarily disabled for the views being animated. (Prior to iOS 5, user interactions are disabled for the entire application.)

If you want users to be able to interact with the views, include the UIViewAnimationOptionAllowUserInteraction constant in the options parameter.([UIView animateWithDuration:delay:options:animations:completion: ])
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: