模拟器实现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:@"" localizedTitle:@"One" localizedSubtitle:@"" icon:icon1 userInfo:nil];

    UIMutableApplicationShortcutItem *item2 = [[UIMutableApplicationShortcutItem alloc]initWithType:@"" localizedTitle:@"Two" localizedSubtitle:@"" icon:icon2 userInfo:nil];

    UIMutableApplicationShortcutItem *item3 = [[UIMutableApplicationShortcutItem alloc]initWithType:@"" 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:@""]){ NSLog(@"执行代码1");
} else if ([shortcutItem.type isEqualToString:@""])
{ NSLog(@"执行代码2"); }
else if ([shortcutItem.type isEqualToString:@""])
{
NSLog(@"执行代码3");
}
}

ios9 -3dtouch 手势添加到app上的更多相关文章

  1. iOS9 3DTouch、ShortcutItem、Peek And Pop技术一览

    [iOS]iOS9 3DTouch.ShortcutItem.Peek And Pop技术一览   3DTouch UITouch类里API的变化 iOS9中添加的属性 altitudeAngle 当 ...

  2. iOS app上传错误集锦(转载)

    1.工程里增加了版本自动更新. 2.未增加判断网络状态的类Reachability. 3.问题:error itms -90049 This bundel is invalid. The bundle ...

  3. Ios App上传步骤

    前言:作为一名IOS开发者,把开发出来的App上传到App Store是必须的.下面就来详细介绍下具体流程. 1.打开苹果开发者中心:https://developer.apple.com 打开后点击 ...

  4. APP上传

    原文网址: http://blog.csdn.net/ayangcool 前言:作为一名IOS开发者,把开发出来的App上传到App Store是必须的.下面就来详细介绍下具体流程. 1.打开苹果开发 ...

  5. anyproxy学习1-windows平台安装和抓手机app上https请求

    前言 做接口测试肯定离不开抓包,目前比较流行的抓包工具是fiddler和charles,相信并不陌生.这里介绍一个阿里公司研发的一个抓包神器,只需打开web页面,就能抓到手机app上的http和htt ...

  6. app上传到App Store的快捷方法及步骤

    跳过证书的申请及配置概要文件的设置, 现在根据已有的配置概要文件及发布证书开始: 1.先在Xcode上的PROJECT和TARGETS->Build Setting->Code Signi ...

  7. django 添加comments app

    django 添加comments app 参看 django comments 文档 安装和配置comments 1.安装comments,运行:pip install django-contrib ...

  8. 关于app上页面和js的调试

    不久前折腾了一晚上关于app上的页面和js的调试: 首先得准备几个比较比较常用的工具: 1.chrome(这个都没有你还干啥fe呀) 2.Fiddler(抓包神器,基本也是必备咯) 3.sublime ...

  9. 实现app上对csdn的文章查看,以及文章中图片的保存 (制作csdn app 完结篇)

    转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/24022165 今天给大家带来CSDN的完结篇,即增加文章的查看和文章中图片的保存 ...

随机推荐

  1. POJ 3270 置换群问题

    题目大意是: 每头牛都有一个对应的值a[i],现在给定一个初始的牛的序列,希望通过两两交换,能够使这些牛按值升序排列,每次交换都会耗费一个 a[i]+a[j] 希望耗费最小,求出这个最小耗费 个人觉得 ...

  2. 分块试水--CODEVS4927 线段树练习5

    模板 #include<stdio.h> #include<algorithm> #include<string.h> #include<stdlib.h&g ...

  3. POJ——1061 青蛙的约会

    青蛙的约会 Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 117858   Accepted: 24599 Descript ...

  4. laravel5.5更新到laravel5.7

    为什么要更新呢?因为项目用的第三方后台扩展包,有很些bug,不够完美.想要一个漂亮的后台,那个后台只支持5.7. 然后,我就开始更新框架了. 修改后:"php": "&g ...

  5. docker: 定时检查docker container的运行状态并发邮件报警

    首先创建一个发送邮件的bash脚本 - send_mail.sh: #!/bin/bash curl -s --user 'api:key-xxxxxxxxxxxxx' \ https://api.m ...

  6. 第5章 Cisco测试命令和TCP/IP连接故障处理

    第5章 Cisco测试命令和TCP/IP连接故障处理 一.故障处理命令 1.show命令: 1) 全局命令: show version :显示系统硬件和软件版本.DRAM.Flash show sta ...

  7. ZOJ2599:Graduated Lexicographical Ordering(很经典的数位DP)

    Consider integer numbers from 1 to n. Let us call the sum of digits of an integer number its weight. ...

  8. 在Tomcat服务器中去端口访问域名

    在刚购买域名并解析后,从外网访问Tomcat服务器时是需要在域名后面加端口":8080".要去端口访问的步骤如下: 在Tomcat目录下的conf文件夹下,打开server.xml ...

  9. 苹果官方Instruments工具之Automation的介绍

    instruments中国的工具測试有非常多,包含非常多方面.eg:内存泄露的測试.网络连接.和cpu内存的使用情况一系列数据的图形界面的显示. 功能的介绍能够看以下的截图图片: watermark/ ...

  10. install yael on the ubuntu 12.04

    1. bits/predefs.h no such file or directory  ??? sudo apt-get install gcc-multilib 2. sudo gedit /et ...