Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

background color changing problem #9

Open
ozgur-nent opened this issue Jun 15, 2021 · 1 comment
Open

background color changing problem #9

ozgur-nent opened this issue Jun 15, 2021 · 1 comment

Comments

@ozgur-nent
Copy link

ozgur-nent commented Jun 15, 2021

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)

@defagos
Copy link
Owner

defagos commented Jun 16, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants