//拖拽手势
- (void)pan:(UIPanGestureRecognizer *)panGestureRecognizer {
// 获取手指的偏移量
CGPoint transP = [panGestureRecognizer translationInView:self.container];
self.container.frame = CGRectMake(self.container.left, self.originY + transP.y, self.container.width, self.container.height);
}
iOS实现拖动视图移动手势
最新推荐文章于 2023-04-13 21:34:42 发布