我有一个列表,其中包含一些 NavigationLinks 作为 OutlineGroup:
\nList {\n OutlineGroup(bundle.topics, children: \\.children) { topic in\n NavigationLink(destination: DetailView(topic: topic)) {\n Label(topic.name, systemImage: topic.children != nil ? "folder" : "doc")\n }\n }\n}\nRun Code Online (Sandbox Code Playgroud)\n我的问题是 iPad Air 设备和 iPad Air 模拟器上的选择颜色不同。在模拟器上,选定的 NavigationLink 的背景颜色为灰色,并且公开指示器仍然可见。
\n\n但在真正的 iPad Air 设备上,选择颜色为蓝色 \xe2\x80\x93 与显示指示器相同的蓝色,并且在选定的行上不可见。
\n\n知道为什么颜色不同吗?我可以手动设置选择背景颜色吗?
\n