【发布时间】:2013-05-09 15:18:40
【问题描述】:
我已经实现,当我的UIButton 突出显示并且我的UISwipeGestureRecognizer 识别到手势时,它将开始一个动画。问题是我想在选择UIButton 并做出手势后调用touchesEnded 时结束动画。但是,如果我在此过程中点击UIButton,则永远不会调用touchesEnded。
其余时间它可以工作,但如果我不能在动画期间使用它,它对我来说毫无用处。这是我所做的:
-(IBAction) swipeDown:(UISwipeGestureRecognizer *)recognizer
{
if(onebutton.highlighted)
{
//Animate
}
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
for(UITouch *touch in touches)
{
if(touch.phase == UITouchPhaseEnded)
{
NSLog(@"touched");
}
}
}
有什么想法吗?
【问题讨论】:
标签: iphone uibutton touches uianimation uiswipegesturerecognizer