presentViewController 添加一个返回手势
2016-07-07 本文已影响186人
三十一_iOS
UIScreenEdgePanGestureRecognizer *edgeGes = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget: self action:@selector(edgePan:)];
edgeGes.edges = UIRectEdgeLeft;
[self.view addGestureRecognizer:edgeGes];
-(void)edgePan:(UIPanGestureRecognizer *)recognizer{
[self dismissViewControllerAnimated:YES completion:^{
}];
}