title: Xamarin UISwipeGestureRecognizer Renderer
body: <p>In Xamarin.Forms I want to be able to swipe left and right to navigate a list of pictures. At the moment I just want to be able to fire an event each time a swipe is detected.</p>
  
  <p>child class to be used in the renderer:</p>
  
  <pre><code>public class LRMasterDetailPage : ContentView
  {
  }
  </code></pre>
  
  <p>I have a ContentPage that uses the LRM class like this:</p>
  
  <pre><code>    public class ImagePage : ContentPage 
      {
  
      public ImagePage(Photo photo)
          {
              _image = new WebImage
                  {
                      Url = photo.Url,
                      Placeholder = "placeHolder2.png"
                  };
  
              var imageView = new LRMasterDetailPage {
                  Content = _image
              };
  
              this.Content = imageView;
             }
        }
  </code></pre>
  
  <p>This is my Renderer:</p>
  
  <pre><code>    [assembly:ExportRenderer (typeof(LRMasterDetailPage), typeof(LRMDPRenderer))]
  namespace Project.iOS
  {
      public class LRMDPRenderer : ViewRenderer&lt;LRMasterDetailPage,UIView&gt;
      {
          UISwipeGestureRecognizer swipe;
  
          protected override void OnElementChanged (ElementChangedEventArgs&lt;LRMasterDetailPage&gt; e)
          {
              base.OnElementChanged (e);
              // Do someting else, init for example
              swipe = new UISwipeGestureRecognizer();
              this.AddGestureRecognizer (swipe);
  
              if (swipe.Direction == UISwipeGestureRecognizerDirection.Left) 
              {
                  UpdateLeft ();
              }
  
              if (swipe.Direction == UISwipeGestureRecognizerDirection.Right) 
              {
                  UpdateRight ();
              }
          }
  
          protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e)
          {
              if (e.PropertyName == "Renderer")
                  return;
              base.OnElementPropertyChanged (sender, e);
  
          }
  
          private void UpdateLeft(){
              // Insert view of DetailLeft element into subview
              // Add button to open Detail to parent navbar, if not yet there
              // Add gesture recognizer for left swipe
              Console.WriteLine ("Left swipe");
  
          }
          private void UpdateRight(){
              // same as for left, but flipped
              Console.WriteLine ("Right swipe");
  
          }
      }
  }
  </code></pre>
  
  <p>When the ContentPage is display the swipe right event is activated, but nothing happens when I try to swipe on top of the image. I am guessing my logic on the renderer is wrong?</p>