我想在父视图中移动一个视图,我使用UIPanGestureRecognizer来移动视图。我正在使用以下代码。
-(void)move:(UIPanGestureRecognizer *)recognizer {
CGPoint touchLocation = [recognizer locationInView:self.customeView];
self.view.center = touchLocation;
}
我想使用 locationInView 来移动视图,而不是使用 translationInView。有人能帮我了解如何在父视图中使用 locationInView 来移动视图吗?