title: After displaying and dismissing the Modal View Controller UIImagePickerController my Cocos2d iPhone app doesn't see multiple touches anymore
body: <p>I have an app where I display the photo chooser (UIImagePickerController) but after the user dismisses it only single touches are working. And I think I know the root of the issue, but I don't know how to solve it... Before I show the modal dialog the stack during a touch is as follows:</p>
  
  <pre>
  ...
  #3  0x00074de0 in -[EAGLView touchesBegan:withEvent:] at EAGLView.m:289
  #4  0x30910f33 in -[UIWindow _sendTouchesForEvent:]
  ...
  </pre>
  
  <p>But after showing and then removing the modal dialog the stack has these two mysterious forwardMethod2 calls:</p>
  
  <pre>
  ...
  #3  0x00074de0 in -[EAGLView touchesBegan:withEvent:] at EAGLView.m:289
  #4  0x3098dc95 in forwardMethod2
  #5  0x3098dc95 in forwardMethod2
  #6  0x30910f33 in -[UIWindow _sendTouchesForEvent:]
  ...
  </pre>
  
  <p>Here is the code I use to display and remove the UIImagePickerController:
  Notes:
   1. pickerViewController is a member of this class that extends UIViewController)
   2. Director is from Cocos2D and contains only a single view attached directly in the root window called openGLView, which is why I made a UIViewController to house my image picker.</p>
  
  <pre><code>-(void)choosePhoto: (id)sender{
      UIImagePickerController *imagePickerController = pickerViewController.imagePickerController;
      imagePickerController.delegate = self;
      imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
      imagePickerController.allowsImageEditing = YES;
  
      UIView *theView = [[Director sharedDirector] openGLView];
      UIView *pickerViewControllerView = pickerViewController.view;
      [theView addSubview:pickerViewControllerView];
      [pickerViewController presentModalViewController:imagePickerController animated:YES];
  }
  </code></pre>
  
  <p>And the code to dismiss the dialog:</p>
  
  <pre><code>- (void)imagePickerControllerDidCancel:(UIImagePickerController *)imagePickerController
  {
      // Dismiss the image selection
      [pickerViewController dismissModalViewControllerAnimated:YES];
      [pickerViewController.view removeFromSuperview];
  
      // HERE... IS THERE MORE WORK TO BE DONE TO COMPLETELY REMOVE THE PICKER VIEW????
  }
  </code></pre>
  
  <p>There must be something I'm missing in cleaning up the picker view... Help is greatly appreciated :)</p>