I am struggling with iOS 3d touch / fast action. I am trying to implement a quick action button similar to the Hangouts application using the UIActivityViewController.
After iOS dev guildes, I almost managed to achieve the goal, but my application starts with a splash and the main screen right after the 3D touch is done, while the Hangouts application presents the UIActivityViewController without showing any control over it.
- (void)handleShortcutItem:(UIApplicationShortcutItem *)item {
NSString *string = @"Share String";
NSURL *URL = [NSURL URLWithString:@"some URL"];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[string, URL] applicationActivities:nil];
[self.window.rootViewController presentViewController:activityViewController animated:YES completion:nil];
Does anyone know how to run these quick actions without running the whole application?
Shaar source
share