SwiftUI NavigationButton without the disclosure indicator?

前端 未结 16 977
不知归路
不知归路 2020-12-02 12:04

When making a List with a row that pushes to a new view, SwiftUI adds a disclosure indicator \">\" automatically? How do I remove it if I don\'t want it?

            


        
16条回答
  •  醉酒成梦
    2020-12-02 12:49

    As of beta 6, this works well:

    struct SwiftUIView: View {   
        var body: some View {
    
            NavigationView {
                List {
                    HStack {
                        Text("My Cell Content")
                        NavigationLink(destination: Text("destination"), label: {
                            EmptyView()
                        })
                    }
                }
            }
        }
    }
    

提交回复
热议问题