2021-08-28

Transparent background for List

i Would like my TableView to become transparent in order to see the gradient background. I have tried with ListRowBackground but it doesn't work.Did I miss something ? What if I want to put another gradient in my Tableview in addition to my background how should i proceed ? Thanks. Canvas

struct test: View {

init() {
    UITableView.appearance().backgroundColor = UIColor.clear
    UITableViewCell.appearance().backgroundColor = .clear
    UITableView.appearance().separatorStyle = .none
}

var body: some View {
    NavigationView {
        ZStack {
            LinearGradient(gradient: Gradient(colors: [Color.red, Color.blue]), startPoint: .top, endPoint: .bottom)
                .edgesIgnoringSafeArea(.all)
                .overlay(
                    
                    List(iphonedata) { data in
                        CompleteCell(contact: data)
                }
            )
        }
        .navigationTitle("Version signées")

    }
}

}



from Recent Questions - Stack Overflow https://ift.tt/38inGcv
https://ift.tt/3gGk4Wt

No comments:

Post a Comment