I have an UIScrollView that contains multiple Views (like 20 views). Each of these views has an Image with background color, a view that contains multiple shapes (CAShapeLayer with pathes) and a PKCanvasView (from iOS 13 PencilKit). It is basically like a PDFView: Multiple pages that you can scroll through.
I want to display an overview of all these views: A UICollectionView with one cell for each view that "mirrors" the whole view. I tried to generate an image from the view, overlay it with an image of the drawing, shrink it to the size I need and then use this image as thumbnail in the UICollectionViewCell. However, this takes extremely long and I can not do it on a background thread.
I have seen other apps do it, so there must be a way: What could I possibly do to mirror these 20 views as small thumbnails in my UICollectionView? I want the user to tap on a button named "Overview" that shows the UICollectionView immediately with a thumbnail of every view in it.