【发布时间】:2013-05-06 01:03:24
【问题描述】:
我有一个 ViewController 类,其中我在 self.view 上有一个名为 templateView 的 UIView,它由一个名为 gridView 的 UIView 组成,这里我需要在 templateView 上滑动,为此我添加了类似滑动手势,
swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeRightAction)];
swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeftAction)];
swipeRight.direction = UISwipeGestureRecognizerDirectionRight;
swipeRight.delegate = self;
swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft;
swipeLeft.delegate = self;
[templateView addGestureRecognizer:swipeRight];
[templateView addGestureRecognizer:swipeLeft];
在swipeRight 和swipeLeft 中我需要移动gridView 的左侧和右侧.. 我需要在这些方法中实现什么..?
【问题讨论】: