UIScreenEdgePanGestureRecognizer *screenEdgeRecognizer = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector(screenEdgeDetected:)];
/*设置边缘起点*/
screenEdgeRecognizer.edges = UIRectEdgeLeft;
[self.view addGestureRecognizer: screenEdgeRecognizer];
- (void)screenEdgeDetected:(UIScreenEdgePanGestureRecognizer *)screenEdge
{
[self dismissViewControllerAnimated:YES completion:nil];
}
网友评论