SwiftUI ScrollView Blurred Bottom Bar

71 Views Asked by At

I currently have a SwiftUI project where I am displaying an AirPods-inspired card view where the user will be able to pair their device to the app, I noticed that whenever the list of devices starts extending to the bottom of the screen, a blurred bottom bar starts to appear. I believe this is behavior from ScrollView

Bottom Blurred Bar

private var deviceListView: some View {
        ScrollView {
            LazyVStack {
                ForEach(bluetoothManager.discoveredDevices, id: \.identifier) { device in
                    deviceRow(for: device)
                }
            }
        }
        .frame(maxWidth: .infinity, maxHeight: 300)
        .padding(.bottom, UIApplication.shared.windows.first?.safeAreaInsets.bottom ?? 0)
}

I thought by adding this line of code under my ScrollView, it would fix the issue, however the blurred bar still appears when the list extends to the bottom. Any suggestions?

.padding(.bottom, UIApplication.shared.windows.first?.safeAreaInsets.bottom ?? 0)

0

There are 0 best solutions below