zoukankan      html  css  js  c++  java
  • 3D touch

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

        // Override point for customization after application launch.

        

        //判断是否支持3D Touch功能

        if (self.window.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable) {

            // 动态添加标签

            UIApplicationShortcutIcon *icon = [UIApplicationShortcutIcon iconWithTemplateImageName:@"扫码图标"];

            UIApplicationShortcutItem *shortItem1 = [[UIApplicationShortcutItem alloc] initWithType:@"扫码" localizedTitle:@"扫码" localizedSubtitle:nil icon:icon userInfo:nil];

            NSArray *shortItems = [[NSArray alloc] initWithObjects:shortItem1, nil];

            NSLog(@"%@", shortItems);

            [[UIApplication sharedApplication] setShortcutItems:shortItems];

        }

        

        return YES;

    }

     

    - (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL))completionHandler{

        if ([shortcutItem.localizedTitle  isEqual: @"扫码"]) {

            

            NSLog(@"打开扫码界面");

            

            ViewController *controller = (ViewController *)self.window.rootViewController;

            [controller goScanne];

            

            return;

        }

    }

     

    其他链接:

    http://blog.csdn.net/a416863220/article/details/51217465

     

     

     

  • 相关阅读:
    xhEditor struts2实现图片上传
    xhEditor入门基础
    jQuery全屏插件Textarea Fullscreen
    jQuery幻灯片插件Skippr
    jQuery跳房子插件hopscotch
    合理配置SQLSERVER内存
    浅谈SQL Server 对于内存的管理
    SQL Server 临时表和表变量系列之选择篇
    SQLTest系列之INSERT语句测试
    转:表变量与临时表的优缺点
  • 原文地址:https://www.cnblogs.com/daxueshan/p/6542028.html
Copyright © 2011-2022 走看看