So, I'm developing an app with a structure like in the image, in which some of the sections scroll horizontally, the orthogonalScrollingBehavior has been sen to paging and the behaviour is working as expected, the only issue is that I'd like to have a UIPageControl there:
I've found several places which explain how to UPDATE the UIPageControl, like the following:
let section = NSCollectionLayoutSection(group: group)
section.orthogonalScrollingBehavior = .groupPaging
section.visibleItemsInvalidationHandler = { (items: [NSCollectionLayoutVisibleItem], offset: CGPoint, environment: NSCollectionLayoutEnvironment) in
let page = (items.last?.indexPath.row ?? 0)
// Update page controller here
}
But none of them explain how to put the UIPageControl, there's no view to attach it, no .xib or anything, is just some flow.