我有以下代碼:用的UIView和動畫完成塊的用戶交互
[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,即使設置了適當的選項,也不會有任何反應。
任何人有任何想法?我GOOGLE了,找不到答案。
對不起,代碼格式不對... – 2011-03-03 13:20:09
歡迎在SO。我將iphone標籤添加到您的問題中(如果我錯了,請修復它),今後先嚐試使用描述平臺和編程語言的標籤,然後再添加一些特定的標籤 – 2011-03-03 13:33:10
感謝您的編輯!非常感激。 – 2011-03-03 13:45:48