SwiftUICollection
SwiftUICollection copied to clipboard
background color changing problem
hi! thank you for this great library!
i've tried to change background color of the collectionview, but it doesn't work. is there another approach that i should use?
.background(Color.blue) .frame(maxWidth: .infinity, maxHeight: .infinity) .ignoresSafeArea(.all)
Hi,
You have to use a transparent color for the UICollectionView
:
let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout(context: context))
collectionView.backgroundColor = .clear
Then your SwiftUI background view should be visible.