iOS 等同于 android 三点菜单图标的是什么?

What is the iOS equivalent of the android three dot menu icon?

Android 使用三个点(如图)表示有更多菜单项可用。此图标的 iOS 等价物是什么?

没有明确的等价物,我能想到的最接近的是 UITabBarItem 内的水平三个点,当没有 space 显示时选项:

话虽这么说,上下文菜单在 iOS 应用程序中并不常见,并且它们没有默认 UI 项

Apple 有 more system icon

查看全部system icons here

如果我没理解错的话,点击 3 个点会显示一个新屏幕,其中包含您所选项目的详细信息?如果是这样,那么在 iOS 上等效的是人字形 (>) 符号。它告诉您点击该条目会将您带到详细信息屏幕。

我自己使用“square.and.arrow.up”系统图标作为我的等效图标。虽然 Android 图标不是那么糟糕,但您可以自己实现它。

此外,底部操作 sheet 非常适合 Android 的上下文菜单。


SwiftUI 动作实现sheet

.actionSheet(isPresented: $showingActionSheet) {
    ActionSheet(title: Text("Change background"), message: Text("Select a new color"), buttons: [
        .default(Text("Red")) { self.backgroundColor = .red },
        .default(Text("Green")) { self.backgroundColor = .green },
        .default(Text("Blue")) { self.backgroundColor = .blue },
        .cancel()
    ])
}

在iOS 14 Apple引入了下拉菜单。它应该是最接近 Android 溢出菜单的东西。例如,您可以将“更多”栏按钮项添加到导航栏并为其附加菜单。

您可以在此处找到有关它的详细信息:https://developer.apple.com/design/human-interface-guidelines/ios/controls/pull-down-menus/

它是:省略号

你可以像这样使用它:

Image(systemName: "ellipsis")