Skip to content

Instantly share code, notes, and snippets.

@canaksoy
Created April 8, 2016 23:15
Show Gist options
  • Save canaksoy/20315a8bddb3a4ac2f3390b1f5019f71 to your computer and use it in GitHub Desktop.
Save canaksoy/20315a8bddb3a4ac2f3390b1f5019f71 to your computer and use it in GitHub Desktop.
UIApplicationShortcutItem
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