3DTouch Demo
来源:互联网 发布:陕西南路美食知乎 编辑:程序博客网 时间:2024/05/18 13:04
Demo下载链接: http://pan.baidu.com/s/1hqKxIx2 密码: kgfp
创建一个新的工程
配置info.plist文件
如下图
在 AppDelegate.h文件里面
#import <UIKit/UIKit.h>@interface AppDelegate : UIResponder <UIApplicationDelegate>@property (strong, nonatomic) UIWindow *window;@end
AppDelegate.m文件
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [UIApplication sharedApplication].applicationIconBadgeNumber=0; return YES;}- (void)application:(UIApplication *)applicationperformActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void(^)(BOOL succeeded))completionHandler{ //判断先前我们设置的唯一标识 if([shortcutItem.type isEqualToString:@"UITouchText.share"]){ NSArray *arr = @[@"hello 3D Touch"]; UIActivityViewController *vc = [[UIActivityViewController alloc]initWithActivityItems:arr applicationActivities:nil]; //设置当前的VC 为rootVC [self.window.rootViewController presentViewController:vc animated:YES completion:^{ }]; } else if ([shortcutItem.type isEqualToString:@"UITouchText.search"]) { UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"温馨提示" message:@"好想你" delegate:nil cancelButtonTitle:@"cancle" otherButtonTitles:@"sure", nil]; [alertView show]; } else if ([shortcutItem.type isEqualToString:@"UITouchText.look"]) { UIActionSheet *sheet = [[UIActionSheet alloc]initWithTitle:@"温馨提示" delegate:nil cancelButtonTitle:@"cancle" destructiveButtonTitle:@"删除" otherButtonTitles:@"更多", nil]; [sheet showInView:self.window]; } else if ([shortcutItem.type isEqualToString:@"UITouchText.compose"]) { NSLog(@"UITouchText.compose"); }}
1 0
- 3DTouch Demo
- 完美版瀑布流,3DTouch Demo
- 3DTouch Demo 从零构建3D Touch 教学
- [绍棠] 关于iOS9 出的3DTouch 功能Demo
- 3DTouch
- 3DTouch
- 3DTouch
- 一个简单的3DTouch、Peek和Pop手势Demo,附github地址
- IOS 3Dtouch
- IOS9 3DTouch
- 3DTouch学习笔记
- 关于3DTouch
- 3DTouch 基本使用
- IOS开发 3DTouch
- 3DTouch简单实现
- 3DTouch的分享
- 3DTouch的使用
- iOS 3DTouch 开发
- 【poj2342】Anniversary party
- Candy
- android中删除文件夹以及文件夹中的文件的方法
- iOS状态栏电量条颜色设置
- 百度地图sdk Android开发学习笔记(一)
- 3DTouch Demo
- mysql数据库常用语句
- 第九周--项目4广义表算法库及应用(1)
- label.setText(num);会报错问题解决方案
- 学习 C++类的多态
- C#中泛型List排序方法 实现.
- jquerymobile 起航
- 用栈实现括号匹配
- Altium designer的简单学习