title: How to swipe gesture segue back to previous view ios?
body: <p>I'm trying to segue back to (QueryController) the view i came from.
  But no swipe actions occurs...
  Not sure what im missing.</p>
  
  <p><img src="https://i.stack.imgur.com/2pLAx.png" alt="enter image description here"></p>
  
  <pre><code>@implementation ProfileController4
  
  
  - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  {
      self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
      if (self) {
          // Custom initialization
  
          UISwipeGestureRecognizer * Swiperight=[[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(swiperight:)];
          Swiperight.direction=UISwipeGestureRecognizerDirectionRight;
          [self.view addGestureRecognizer:Swiperight];
  
          UISwipeGestureRecognizer * Swipeleft=[[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(swipeleft:)];
          Swipeleft.direction=UISwipeGestureRecognizerDirectionLeft;
          [self.view addGestureRecognizer:Swipeleft];
      }
      return self;
  }
  
  
  
  -(void)swipeleft:(UISwipeGestureRecognizer*)gestureRecognizer
  {
      //Do what you want here
  
  }
  
  -(void)swiperight:(UISwipeGestureRecognizer*)gestureRecognizer
  {
      //Do what you want here
  
      [self performSegueWithIdentifier: @"friendsBackToQuerySeg" sender: self];
  
  //      [[UIViewController alloc] initWithNibName:@"QueryController1" bundle:nil];
  
  }
  </code></pre>