如何在横幅图像上的Apple App Store中显示样式的后退按钮?

问题描述 投票:-1回答:1

我需要有一个后退按钮,该按钮看起来像在Apple App Store的任何应用程序页面上显示的那样,带有横幅图像。见下图:

back button with filled like style of other System buttons

我尝试按照此处的指导查找任何可能的系统图标图像名称:

https://stackoverflow.com/a/58900114/1152014

但是找不到合适的人。请指导。

ios swift uinavigationcontroller uinavigationbar back
1个回答
2
投票

系统图标图像名称为chevron.left.circle.fill(具有填充颜色的一个)和chevron.left.circle(具有填充颜色的一个)

默认情况下,填充颜色为黑色,您可以使用前景色选项进行更改。

import SwiftUI

struct ContentView: View {
    var body: some View {
        List {
            Image(systemName: "chevron.left.circle.fill")
                .resizable()
                .frame(width: 50, height: 50, alignment: .center)
                .listRowBackground(Color.green)
            Text("")
            Image(systemName: "chevron.left.circle")
                .resizable()
                .frame(width: 50, height: 50, alignment: .center)
                .listRowBackground(Color.green)
        }
        .foregroundColor(.white)
    }
}

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.