Created
April 8, 2016 23:15
-
-
Save canaksoy/20315a8bddb3a4ac2f3390b1f5019f71 to your computer and use it in GitHub Desktop.
UIApplicationShortcutItem
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
UIApplicationShortcutIcon * photoIcon = [UIApplicationShortcutIcon iconWithTemplateImageName: @"selfie-100.png"]; // your customize icon | |
UIApplicationShortcutItem * photoItem = [[UIApplicationShortcutItem alloc]initWithType: @"selfie" localizedTitle: @"take selfie" localizedSubtitle: nil icon: photoIcon userInfo: nil]; | |
UIApplicationShortcutItem * videoItem = [[UIApplicationShortcutItem alloc]initWithType: @"video" localizedTitle: @"take video" localizedSubtitle: nil icon: [UIApplicationShortcutIcon iconWithType: UIApplicationShortcutIconTypeCaptureVideo] userInfo: nil]; | |
[UIApplication sharedApplication].shortcutItems = @[photoItem,videoItem]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment