title: UIActivity activityViewController being presented modally on iPad instead of in popover
body: <p>When using a customer UIActivity subclass in iOS 6, it's possible to specify a custom view controller that will be displayed when your action is chosen from the initial UIActionViewController's view. You do this by returning a reference to a custom view controller from your UIActivity subclass's <code>activityViewController</code> method.</p>
  
  <p>According to the <a href="http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIActivity_Class/Reference/Reference.html">UIActivity class reference</a>:</p>
  
  <blockquote>
    <p><strong>activityViewController</strong></p>
    
    <p>The default implementation of this method returns <code>nil</code>. Subclasses that provide additional UI using a view controller can override this method to return that view controller. If this method returns a valid object, the system presents the returned view controller for you, instead of calling the <code>performActivity</code> method. On iPad, your view controller is presented inside of a popover. On iPhone and iPod touch, your view controller is presented modally.</p>
    
    <p>Your custom view controller should provide a view with your custom UI and should handle any user interactions inside those views. Upon completing the activity, do not dismiss the view controller yourself. Instead, call the <code>activityDidFinish:</code> method and let the system dismiss it for you.</p>
  </blockquote>
  
  <p>Note that bit at the end of the first paragraph: <strong>On iPad, your view controller is presented inside of a popover. On iPhone and iPod touch, your view controller is presented modally.</strong></p>
  
  <p>However, on iPad the view controller returned by <code>activityViewController</code> always displays modally, no matter how I present the UIActivityViewController (either modally or via a popover).  When presenting via a popover, it causes it to crash since it doesn't think it's been dismissed.</p>
  
  <p>What am I doing wrong? Is this a bug in iOS 6?</p>
  
  <hr>
  
  <p><strong>Update: here's a simple Xcode project that illustrates the problem. Feel free to clone it and play around to see if you can see where we're going wrong: <a href="https://github.com/simonwhitaker/GSActivityDemo">github.com/simonwhitaker/GSActivityDemo</a></strong></p>