I'm trying to add a custom action to the cancel button so that I can show banners again after done with the UIActivityViewController
.
[self presentViewController:activityController animated:YES completion:nil];
[activityController setCompletionHandler:^(NSString *act, BOOL done)
{
if (!act) {
NSLog(@"Cancel");
[[RevMobAds session] showBanner];
}
}];
}
This is what I've tried so far but it crashes when I press the UIActivityViewController
button and shows the error:
exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller