UIScreenEdgePanGestureRecognizer  * screenEdge = [[UIScreenEdgePanGestureRecognizer alloc]initWithTarget:self action:@selector(screenEdge:)];
  
 设置屏幕边缘
    UIRectEdgeNone
    UIRectEdgeTop
    UIRectEdgeLeft
    UIRectEdgeBottom
    UIRectEdgeRight
    UIRectEdgeAll

   screenEdge.edges = UIRectEdgeLeft;
    
    
   [redView addGestureRecognizer:screenEdge];




-(void)screenEdge :(UIScreenEdgePanGestureRecognizer *)screenEdge
{
    CGPoint point = [screenEdge translationInView:screenEdge.view];
    screenEdge.view.transform = CGAffineTransformTranslate(screenEdge.view.transform, point.x, 0);
    [screenEdge setTranslation:CGPointZero inView:screenEdge.view];
}