Больше не нужен ответ, я ответил на свой вопрос: p
Для тех, кто хочет получить ответ, вот код:
UITouch *touch = [touches anyObject];
currentTouch = [touch locationInView:self.view];
if (currentTouch.x >10 && currentTouch.x < 300 && currentTouch.y >245 && currentTouch.y < 440) {
CGRect myImageRect = CGRectMake(currentTouch.x, currentTouch.y, 5.0f, 5.0f);
myImage = [[UIImageView alloc] initWithFrame:myImageRect];
[myImage setImage:[UIImage imageNamed:@"dot.png"]];
myImage.tag = tag;
[self.view addSubview:myImage];
[myImage release];
if (!CGPointEqualToPoint(lastTouch, CGPointMake(0, 0))) {
CGPoint nextPoint;
for (double h = 0.0; h<25.0; h++) {
double blend = h/25;
nextPoint.x = currentTouch.x + (blend * (lastTouch.x - currentTouch.x));
nextPoint.y = currentTouch.y + (blend * (lastTouch.y - currentTouch.y));
myImageRect = CGRectMake(nextPoint.x, nextPoint.y, 5.0f, 5.0f);
myImage = [[UIImageView alloc] initWithFrame:myImageRect];
[myImage setImage:[UIImage imageNamed:@"dot.png"]];
myImage.tag = tag;
[self.view addSubview:myImage];
[myImage release];
}
}
lastTouch = currentTouch;
}
}
Я добавил точку, называемую последним касанием, чтобы записать последнюю точку, а затем цикл (для), чтобы заполнить пробелы между текущей точкой и последней.