title: Conformance to UIImagePickerControllerDelegate protocol not being seen by the compiler
body: <p>I'm missing something. This code functions fine, but I like to clear up all compiler warnings.</p>
  
  <pre><code>Sending 'GSBBuilderImageButton *const __strong' to parameter of incompatible type 'id&lt;UINavigationControllerDelegate,UIImagePickerControllerDelegate&gt;'
  </code></pre>
  
  <p>In past experiences with this warning message, I never noticed <em>two</em> protocols being mentioned in the warning -- and fair enough, in this case I have no idea why there is a reference to a UINavigationControllerDelegate.</p>
  
  <p>But here's my interface first:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "GSBImageButtonDelegate.h"
  
  @interface GSBBuilderImageButton : UIButton &lt;UIImagePickerControllerDelegate&gt;
  {
      UIPopoverController *popover;
      UIImage *imageData;
      NSURL *mediaURL;
      id &lt;GSBBuilderImageButtonDelegate&gt; _delegate;
  }
  @property (strong, nonatomic) NSURL *mediaURL;
  @property (strong, nonatomic) UIImage *imageData;
  @property (strong, nonatomic) id &lt;GSBBuilderImageButtonDelegate&gt; delegate;
  - (void)removePicture;
  - (void)setImageData:(UIImage *)theImageData;
  
  @end
  </code></pre>
  
  <p>Of importance is the @interface declaration which includes the UIImagePickerControllerDelegate adoption.</p>
  
  <p>Over in my implementation I pay attention to a touch (I think at the time I wrote this I wasn't using setTarget:forAction:forControlState: because this class started life as a UIView):</p>
  
  <pre><code>- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
  {
      // really need to check to see that the touch ended while within our bounds
  
      UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
  
      [imagePicker setSourceType:UIImagePickerControllerSourceTypeSavedPhotosAlbum];
      [imagePicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
      [imagePicker setDelegate:self];
  </code></pre>
  
  <p>So the way I read that is that the local object, imagePicker, is being told that it's delegate is this instance of a GSBBuilderImageButton, which in its interface declares that it conforms to the UIImagePickerControllerDelegate protocol.  That seems perfectly valid and something we do all the time.  While it's true that my GSBBuilderImageButton has its own delegate, that shouldn't bear on this unless I've done something wrong.</p>
  
  <p>There's more after that, of course, including implementation of the optional protocol method </p>
  
  <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
  </code></pre>
  
  <p>I'm building this button programatically, so for completeness, here's the init I'm using:</p>
  
  <pre><code>- (id)initWithFrame:(CGRect)frame
  {
      self = [super initWithFrame:frame];
      if (self) {
          // Initialization code
          [[self imageView] setContentMode:UIViewContentModeScaleAspectFill];
          UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(removePicture)];
          [self addGestureRecognizer:longPress];
      }
      return self;
  }
  </code></pre>
  
  <p>(Note: Don't get hung up on my definition of setImageData... that's a wrapper method that calls UIButton's setImage but also a few other tasks and it's legacy is the same UIView heritage -- for version 2.0 of this app I'll override setImage:!</p>