Maybe my way it's not the best way, but it works. Simply make a NSMutableArray where you store the touches, and then you can get both positions.
NSMutableArray *array = [[NSMutableArray alloc]init];
In your touchBegan and touchEnded method:
-(void) touchBegan:(UITouch *)touch withEvent:(UIEvent *)event{
[array addObject:touch]; //add new touch to array
}
-(void) touchEnded:(UITouch *)touch withEvent:(UIEvent *)event{
[array removeObject:touch]; //remove touch that ended
}
In your method to get position:
//EXAMPLE.
if (array.count > 1){ //check that there are two touches
CGPoint point1 = [array[0] locationInNode:self];
CGPoint point2 = [array[1] locationInNode:self];
}else{ //I suppose there are ONE or TWO touches, not more.
CGPoint point1 = [array[0] locationInNode:self];
}
I think this is correct. Tell me if you have any problem.