-1

我的 plist 中定义了 5 个项目。它只显示了 4 个。‍♂️</p>

我试过了Simulator实际 iPhone XS Max的。

    <array>
        <dict>
            <key>UIApplicationShortcutItemIconFile</key>
            <string>home</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Home</string>
            <key>UIApplicationShortcutItemType</key>
            <string>homePressed</string>
        </dict>
        <dict>
            <key>UIApplicationShortcutItemIconFile</key>
            <string>security</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Security</string>
            <key>UIApplicationShortcutItemType</key>
            <string>securityPressed</string>
        </dict>
        <dict>
            <key>UIApplicationShortcutItemIconFile</key>
            <string>alert</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Alert</string>
            <key>UIApplicationShortcutItemType</key>
            <string>alertPressed</string>
        </dict>
        <dict>
            <key>UIApplicationShortcutItemIconFile</key>
            <string>network</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Network</string>
            <key>UIApplicationShortcutItemType</key>
            <string>networkPressed</string>
        </dict>
        <dict>
            <key>UIApplicationShortcutItemIconFile</key>
            <string>settings</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Settings</string>
            <key>UIApplicationShortcutItemType</key>
            <string>settingsPressed</string>
        </dict>
    </array>

结果

在此处输入图像描述

我做错什么了吗?

4

2 回答 2

1

根据苹果

当用户按下主屏幕应用程序图标时,系统会限制显示的快速操作的数量。在有限的一组显示的快速操作标题中,首先显示静态快速操作,从列表中的最顶部位置开始。如果您的静态项目未消耗允许的显示数量,并且您还使用此类定义了动态快速操作,则显示您的一个或多个动态快速操作。

也就是说,系统规定了显示的最大项目数,并选择您提供的前 n 个项目进行显示。

我找不到显示确切限制的任何地方,但我没有看到任何应用程序有超过 4 个项目 + “共享”项目。

于 2019-03-03T13:13:28.133 回答
1

我认为有四个项目的限制,查看文件

当用户按下主屏幕应用程序图标时,系统会限制显示的快速操作的数量。在有限的一组显示的快速操作标题中,首先显示静态快速操作,从列表中的最顶部位置开始。如果您的静态项目未消耗允许的显示数量,并且您还使用此类定义了动态快速操作,则显示您的一个或多个动态快速操作。

更新关于Share项目的讨论:

显然,iOS 会自动添加 SHARE,但仅当应用程序是从 Appstore 安装时。– 京

这使它们成为四个 + 共享项目,因为 AppStore 会自动在每个下载的应用程序上添加共享应用程序项目

于 2019-03-03T13:14:14.793 回答