Created
October 26, 2015 05:21
-
-
Save y8k/c96c6811b9d72c0b31a3 to your computer and use it in GitHub Desktop.
Dynamic quick actions example
This file contains 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
let firstShortCutIcon = UIApplicationShortcutIcon(templateImageName: "ShortCut01") | |
let firstFunctionShortCutItem = UIApplicationShortcutItem(type: "com.y8k.touchExample.function01", localizedTitle: "Member Func. 1", localizedSubtitle: "Dynamic short cut item", icon: firstShortCutIcon, userInfo: nil) | |
let secondShortCutIcon = UIApplicationShortcutIcon(templateImageName: "ShortCut02") | |
let secondFunctionShortCutItem = UIApplicationShortcutItem(type: "com.y8k.touchExample.function02", localizedTitle: "Member Func. 2", localizedSubtitle: "Dynamic short cut item", icon: secondShortCutIcon, userInfo: nil) | |
UIApplication.sharedApplication().shortcutItems = [firstFunctionShortCutItem, secondFunctionShortCutItem] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment