I'm trying to figure out how to make it so that when I'm moving an object around, I'm not "holding" it in the center of the object, but rather towards the left or right. This is my code so far...
-
(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *myTouch = [[event allTouches] anyObject];
image1.center = [myTouch locationInView:self.view];
image1.image = [UIImage imageNamed:@"image1.png"];
}
I would imagine it's because of image1.center, but how do i make it so that it gets touched somewhere else, not the center?