没有指定属性 - edges
具体实现代码如下:
- (void)viewDidLoad
{
[super viewDidLoad];
// 侧滑手势
UIScreenEdgePanGestureRecognizer *edgePanGesture = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector(edgePanGestureResponse:)];
edgePanGesture.edges = UIRectEdgeLeft;
[self.view addGestureRecognizer:edgePanGesture];
}
- (void)edgePanGestureResponse:(UIScreenEdgePanGestureRecognizer *)recognizer
{
CGFloat containViewX = [recognizer translationInView:self.view].x;
NSLog(@"containViewX = %f",containViewX);
}