ios使用3dD Touch Screen Short Cut
来源:互联网 发布:淘宝客返现 编辑:程序博客网 时间:2024/06/05 17:13
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
if (IOS9_OR_LATER) {
[selfshortCut];
}
}
- (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void(^)(BOOL succeeded))completionHandler
{
if ([shortcutItem.typeisEqualToString:@"searchItem"]) {
SearchViewController *room = [[SearchViewController alloc] init];
[baseNav pushViewController:room animated:YES];
}
if ([shortcutItem.type isEqualToString:@"icon_recharge"]) {
RechargeViewController *room = [[RechargeViewController alloc] init];
[baseNav pushViewController:room animated:YES];
}
}
//3d touch screen short cut
- (void) shortCut
{
NSArray * typeArray =@[@"searchItem",@"rechargeItem"];//key类型
NSArray * titleArray =@[@"搜索",@“充值”];//标题
//图标名字,项目资源中的图标名称
NSArray * imageNameArray =@[@"icon_search",@"icon_recharge"];
NSMutableArray * itemArray = [[NSMutableArrayalloc] init];
for (int i=0; i<typeArray.count; i++) {
UIApplicationShortcutIcon * icon = [UIApplicationShortcutIconiconWithTemplateImageName:imageNameArray[i]];
UIMutableApplicationShortcutItem * item = [[UIMutableApplicationShortcutItemalloc] initWithType:typeArray[i]localizedTitle:titleArray[i] localizedSubtitle:@""icon:icon userInfo:nil];
[itemArray addObject:item];
}
[UIApplicationsharedApplication].shortcutItems = itemArray;
}
- ios使用3dD Touch Screen Short Cut
- short cut使用动态图片
- short cut使用动态图片
- iOS 3D Touch使用<一、 Home Screen Quick Actions使用>
- Touch Screen
- Touch screen
- show desktop short cut
- vs2003 short cut
- 实用windows short cut
- iOS开发 3D-touch使用
- IOS 3D touch的使用
- iOS 3D Touch简单使用
- ios 3D Touch 的使用
- iOS 9 以后使用3D touch()
- iOS---touch使用注意事项
- touch-screen with Timer
- Designing for Touch Screen
- ARM9(S3C2440) Touch Screen
- Java基础学习7_类和对象
- WordPress CMS化的十二个必备插件
- RabbitMQ入门教程 For Java【9】 - 与Spring集成
- iOS项目上传到AppStore步骤流程
- guava cache
- ios使用3dD Touch Screen Short Cut
- C++中的引用
- go get安装第三方包的前提条件和步骤
- 将自定义参数从uboot传入kernel的并读取的方法
- tabbar适时隐藏
- 第一篇博客
- Funny In C++ 开篇
- 视图Ext.Viewport和窗口Ext.Window用法
- 面向对象