Open sebasdeweert opened 1 year ago
calendar.calendarWeekdayView.snp.makeConstraints { make in make.horizontalEdges.equalToSuperview().inset(24) make.height.equalTo(36) }
calendar.collectionViewLayout.sectionInsets = .init(top: 5, left: 24, bottom: 5, right: 24)
How can I add a contentInset to the calendar view?
I want to have an inset on the left and right sides.
Now, when I do this with constraints and I scroll the page, the calendar is cut off at the edge. I want to use contentInset to eliminate this edge and make the swipe smoother, utilizing the full-screen edges.
I tried this code, but it's not working:
self.calendar.collectionView.contentInset = UIEdgeInsets(top: 0.0, left: 40.0, bottom: 0.0, right: 40.0)
My calendar right now with constraint:
What I would like to achieve:
Thanks!!