I have a UIActivity
subclass that creates its own activityViewController
:
- (UIViewController *)activityViewController {
WSLInProgressViewController* progressView = [[[WSLInProgressViewController alloc] init] autorelease];
progressView.message = [NSString stringWithFormat:NSLocalizedString(@"Posting to %@...",@"Posting to..."),
self.activityType];
return progressView;
}
I've add a full repro on GitHub.
According to the documentation, you aren't supposed to dismiss this manually. Instead, the OS does that when you call activityDidFinish:
. This works fine when ran on an iPhone.
When I say "works," this is the sequence of events that I'm expecting (and see on the iPhone):
- Display the
UIActivityViewController
- User presses my custom activity
- My view controller appears
- I call
activityDidFinish:
- My custom view controller is dismissed
- The
UIActivityViewController
is also dismissed
However, when I run this same code on the iPad Simulator -- the only difference being that I put the UIActivityViewController
in a popup, as the documentation says you should -- the activityViewController
never dismisses.
As I say, this is code wo/the popUP works on the iPhone and I have stepped through the code so I know that activityDidFinish:
is getting called.
I found this Radar talking about the same problem in iOS6
beta 3, 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!).
Am I missing something? Do I need to do something special in the activityViewController when it's run in a UIPopoverViewController
? Is the "flow" supposed to be different on the iPad?
activityViewController
is useless on iPad. – MicroreaderactivityViewController
. – Hummocky