• ios9 -3dtouch 手势添加到app上


    模拟器实现3dtouch参考以下网站:
    http://my.oschina.net/u/2340880/blog/511509



    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UIApplicationShortcutIcon *icon1 = [UIApplicationShortcutIcon iconWithTemplateImageName:@"app_c_s_1"]; UIApplicationShortcutIcon *icon2 = [UIApplicationShortcutIcon iconWithTemplateImageName:@"app_c_s_2"]; UIApplicationShortcutIcon *icon3 = [UIApplicationShortcutIcon iconWithTemplateImageName:@"app_c_s_3"]; UIMutableApplicationShortcutItem *item1 = [[UIMutableApplicationShortcutItem alloc]initWithType:@"1" localizedTitle:@"One" localizedSubtitle:@"" icon:icon1 userInfo:nil]; UIMutableApplicationShortcutItem *item2 = [[UIMutableApplicationShortcutItem alloc]initWithType:@"2" localizedTitle:@"Two" localizedSubtitle:@"" icon:icon2 userInfo:nil]; UIMutableApplicationShortcutItem *item3 = [[UIMutableApplicationShortcutItem alloc]initWithType:@"3" localizedTitle:@"Three" localizedSubtitle:@"" icon:icon3 userInfo:nil]; NSArray *items = @[item1, item2, item3]; [UIApplication sharedApplication].shortcutItems = items; } - (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL))completionHandler { if([shortcutItem.type isEqualToString:@"1"]){ NSLog(@"执行代码1"); } else if ([shortcutItem.type isEqualToString:@"2"]) { NSLog(@"执行代码2"); } else if ([shortcutItem.type isEqualToString:@"3"]) { NSLog(@"执行代码3"); } }

     

     

     

     

  • 相关阅读:
    每日总结
    每日总结
    团队冲刺阶段二(10)
    团队冲刺阶段二(9)
    团队冲刺阶段二(8)
    团队冲刺阶段二(7)
    团队冲刺阶段二(6)
    团队冲刺阶段二(5)
    团队冲刺阶段二(4)
    根据Panda Global了解,中央政治局第十八次集体学习中指出“区块链技术的集成应用在新的技术革新和产业变革中起着重要作用”
  • 原文地址:https://www.cnblogs.com/thbbsky/p/4992320.html
Copyright © 2020-2023  润新知