Note that there are some explanatory texts on larger screens.

plurals
  1. POUIActivity activityViewController not dismissing on iPad
    primarykey
    data
    text
    <p>I have a <code>UIActivity</code> subclass that creates its own <code>activityViewController</code>:</p> <pre><code>- (UIViewController *)activityViewController { WSLInProgressViewController* progressView = [[[WSLInProgressViewController alloc] init] autorelease]; progressView.message = [NSString stringWithFormat:NSLocalizedString(@"Posting to %@...",@"Posting to..."), self.activityType]; return progressView; } </code></pre> <p>I've add a full <a href="https://github.com/sdarlington/ActivityViewContollerBug">repro on GitHub</a>.</p> <hr> <p>According to the documentation, you aren't supposed to dismiss this manually. Instead, the OS does that when you call <code>activityDidFinish:</code>. This works fine when ran on an iPhone.</p> <p>When I say "works," this is the sequence of events that I'm expecting (and see on the iPhone): </p> <ol> <li>Display the <code>UIActivityViewController</code> </li> <li>User presses my custom activity</li> <li>My view controller appears </li> <li>I call <code>activityDidFinish:</code> </li> <li>My custom view controller is dismissed </li> <li>The <code>UIActivityViewController</code> is also dismissed</li> </ol> <p>However, when I run this same code on the iPad Simulator -- the only difference being that I put the <code>UIActivityViewController</code> in a popup, as the documentation says you should -- the <code>activityViewController</code> never dismisses.</p> <p>As I say, this is <em>code wo/the popUP</em> works on the iPhone and I have stepped through the code so I know that <code>activityDidFinish:</code> is getting called.</p> <p>I found this Radar talking about the <a href="http://openradar.appspot.com/12034500">same problem in <code>iOS6</code> beta 3</a>, but it seems such fundamental functionality that I suspect a bug in my code rather than OS (also note that it works correctly with the Twitter and Facebook functionality!).</p> <hr> <p>Am I missing something? Do I need to do something special in the activityViewController when it's run in a <code>UIPopoverViewController</code>? Is the "flow" <em>supposed</em> to be different on the iPad?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload