This is possibly an issue with the coordinate systems and the view that is responding to the touch. When you get your location, it is in the coordinate system of touch.view
, which could be your AddView. When you change the frame of AddView, the position of the touch will change as well, causing the "jumping" you are seeing.
You can make sure the location of the touch is given in coordinates of AddView's parent view with the line:
CGPoint location = [touch locationInView:AddView.superview];
Also just a tip about Objective-C convention: instance variable names should generally start with a lowercase character and be accessed with dot notation: self.addView
rather than AddView
.