Search code examples
iosswiftswift3uicollectionviewrounded-corners

Collection View with corner radius in Swift


I have a CollectionViewController and I would like to set corner radius to the CollectionView (the part below the header view).

enter image description here

This is what I would like (the corner radius in yellow). Is it possible? Do you have any idea about how I could do that?


Solution

  • The solution was quite simple. I have just removed the inset on the top of the collectionViewLayout and added a new view to the HeaderView. After that, I applied the corner radius to the view added and it worked :)