I’m creating this loop, and as you can see, there is a problem: you can’t initialize a variable-sized object in this kind of situation. How would I set the loop up so that it creates pointer names for the UITouch unique, without an array, for example if there are 3 touches, the loop would create three separate UITouch pointers, touch1, touch2, and touch3.
for (int i = 1; i <= touchCount; i++) {
UITouch *touch[i] = [touchArray objectAtIndex:i-1];
}
What you want to do is unnecessary since you already have pointers to your touches stored in touchArray. If you want to explicitly create distinct object for each touch you have to create them manually.
Or you could do a little trick like this:
//Create a method named touchNumbered:(int)number
It all depends on what you want to do with those touches.