SwiftUI NavigationButton without the disclosure indicator?

前端 未结 16 975
不知归路
不知归路 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:38

    there is no documentation yet, so you can use ScrollView for now

      NavigationView {
            ScrollView {
                ForEach(0...100){ x in
                    NavigationButton(destination: Text("ss")) {
                        HStack {
                              Text(String(x))
                              Spacer()
                            }
                            .padding()
                            .background(Color.white)
                            .shadow(radius:1,y:1)
                    }
                 }
                 .frame(width: UIScreen.main.bounds.width - 32)
                 .padding()
            }
        }
    

提交回复
热议问题