Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save amannayak0007/4945f514a4e87df6330c1af6b6260013 to your computer and use it in GitHub Desktop.
Save amannayak0007/4945f514a4e87df6330c1af6b6260013 to your computer and use it in GitHub Desktop.
3dtouch Quick Action
// =========================================================================
// MARK: - Home Screen Quick Action
func application(application: UIApplication, performActionForShortcutItem shortcutItem: UIApplicationShortcutItem, completionHandler: (Bool) -> Void) {
switch shortcutItem.type {
case "com.game.share":
let items = ["Check out the simple & very challenging game! #Hurtle",
NSURL(string: "https://itunes.apple.com/in/app/hurtle/id1085122455?mt=8")!
]
let activityVC = UIActivityViewController(
activityItems: items,
applicationActivities: nil)
window?.rootViewController?.presentViewController(activityVC, animated: true, completion: { () -> Void in
//
})
default:
break
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment