79542706

Date: 2025-03-29 02:24:06
Score: 0.5
Natty:
Report link

After a good night of sleep and jumping back into trial and error today, I seem to have narrowed down what was causing the issue.

The solution appears to be a combination of removing .listRowBackground(Color.clear) from the ItemCellView.

List(viewModel.enabledCategories, id: \.self, selection: $selections.selectedCategory) { category in            
    ItemCellView(title: category.name, image: category.image)
        .listRowSeparator(.hidden)
        .listRowInsets(.init(top: 0, leading: 0, bottom: 0, trailing: 0))
//      .listRowBackground(Color.clear)
        .background(.clear)
        .buttonStyle(.plain)
}

Then also removing .listStyle(.plain) from the CustomListStyle modifier.

struct CustomListStyle: ViewModifier {
    func body(content: Content) -> some View {
        content
//            .listStyle(.plain)
            .listRowSpacing(10)
            .scrollIndicators(.hidden)
            .scrollContentBackground(.hidden)
            .background(Color.clear)
            .padding(.top, 10)
            .buttonStyle(.plain)
    }
}

Thank you to those who have contributed to this post, I appreciate the time and effort put in. Happy to have found a solution to this so I may move on and stop obsessing about it.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Taylor Anderson