ios - UIActivityViewController not working after Cancel -


i using instance of uiactivityviewcontroller in universal app. works absolutely on ipad. nearly, not quite on iphone.

i present using:

    [self presentviewcontroller:self.activityviewcontroller animated:yes completion:nil]; 

it displays available activities correctly , if choose one, works. can tap on share button again , repeat same or different activity like, long complete activity.

if cancel uiactivityviewcontroller, well; if cancel from, say, mail or message, next time tap on share, nothing happens. if impatient , tap again, following error:

'application tried present modally active controller .'

i've tried dismissing controller before presenting second time, doesn't think dismissible. i've tried presenting root/navigation controller tableviewcontroller, equivalent error (i.e. app tried present root controller).

i see there lots of 'odd' problems uiactivityviewcontroller, can't see relevant problem.

the problem due example code i'd used. assumed dismiss code being executed, when wasn't!

i ended implementing uipopovercontrollerdelegate , implementing:

- (void)popovercontrollerdiddismisspopover:(uipopovercontroller *)popovercontroller {     [self setpopoveractivity:nil]; } 

this fixed it!


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -