SwiftUICollection icon indicating copy to clipboard operation
SwiftUICollection copied to clipboard

background color changing problem

Open ozgur-nent opened this issue 3 years ago • 1 comments

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)

ozgur-nent avatar Jun 15 '21 13:06 ozgur-nent

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.

defagos avatar Jun 16 '21 11:06 defagos