Created
April 27, 2016 08:22
-
-
Save amannayak0007/4945f514a4e87df6330c1af6b6260013 to your computer and use it in GitHub Desktop.
3dtouch Quick Action
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ========================================================================= | |
| // 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