I have a UIView and I want to move it only vertically by dragging it.
I used this code:
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:touch.view];
AddView.frame = CGRectMake(AddView.frame.origin.x, location.y, AddView.frame.size.width, AddView.frame.size.height);
}
If I do this, the view jumps up and down very quickly.
What am I doing wrong?