Hi,
I have 4-5 uibuttons(also can use uiview instead of button) side by side next to each other.
When user moves touch from one button to other(outside of self view), i want to cancel this touch and start touch for the next button(view).
How to achieve this functionality?
I used uiview instead of buttons kept it next to each other, handled its touches events.
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [touches anyObject]; //anyobject
CGPoint touchLocation = [touch locationInView:touch.view];
if(![self pointInside:touchLocation withEvent:nil])
{
//touch is outside of my current view , do something to cancel current touch and i can get touchesmoved for the next view . help me to write something.
}
}
Is there any other way to handle event when we have such UI.
Thanks.