How to have multiple touches
I have written my code that allows multiple UIImageViews to move, but not at the same time. How can I change this to make the images move at the same time with different touches?
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *DragTop = [[event allTouches] anyObject];
CGPoint locationTop = [DragTop locationInView:DragTop.view];
UITouch *DragBottom = [[event allTouches] anyObject];
CGPoint locationBottom = [DragBottom locationInView:DragBottom.view];
if(CGRectContainsPoint(CGRectMake(0, 284, 320, 284), locationBottom)){
Player.center = [DragBottom locationInView:DragBottom.view];
}
if(CGRectContainsPoint(CGRectMake(0, 0, 320, 284), locationTop)){
Computer.center = [DragTop locationInView:DragTop.view];
}
}
Thanks!
MacBook Pro (13-inch Mid 2012), OS X Mavericks (10.9)