您好,欢迎来到二三四教育网。
搜索
您的当前位置:首页swift3.0 给app图标添加 3D touch

swift3.0 给app图标添加 3D touch

来源:二三四教育网
image.png

1.在 info.plist文件中添加

<key>UIApplicationShortcutItems</key>
    <array>
        <dict>
            <key>UIApplicationShortcutItemIconType</key>
            <string>UIApplicationShortcutIconTypeShare</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>My MemberShip</string>
            <key>UIApplicationShortcutItemType</key>
            <string>Share17Hi</string>
        </dict>
    </array>
    func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) {
        
        switch shortcutItem.type {
        case "Share17Hi":
            print("Do what u want")
        default:
            break
        }
    }

Copyright © 2019- how234.cn 版权所有 赣ICP备2023008801号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务