【发布时间】:2011-07-08 01:30:09
【问题描述】:
我有以下代码:
[UIView animateWithDuration:2.0 delay:0.0 options:UIViewAnimationOptionAllowUserInteraction
animations:^{
imageView.bounds = endBounds;
}
completion:^(BOOL finished) {
[UIView animateWithDuration:2.0 delay:0.5 options:UIViewAnimationOptionAllowUserInteraction
animations:^{
imageView.bounds = startBounds;
}
completion:^(BOOL finished) {
[imageView removeFromSuperview];
}];
}];
另外我还有:
[imageView setUserInteractionEnabled:YES];
还有一个点击手势识别器集,将处理用户在 imageView 上的点击。当第一个动画发生时,手势识别器会按我的预期触发。但是,如果我尝试在完成块的链接动画期间点击 imageView,即使我设置了适当的选项,也不会发生任何事情。
有人有什么想法吗?我用谷歌搜索了,找不到答案。
【问题讨论】:
-
抱歉代码格式不佳...
-
欢迎来到 SO。我在您的问题中添加了 iphone 标签(如果我错了,请修复它),将来尝试首先放置描述平台和编程语言的标签,然后放在一些特定的标签之后
-
感谢编辑!非常感谢。
标签: iphone animation uiview gesture completion-block