everyone!
I'm working in Swift 3, but if there is no solution in Swift 3 I would be willing to work in Swift 2.
I have a UICollectionView and a UIImageView that is contained in a UIView along with an image (and all this is contained in a UIScrollView, which means a lot of content is off-screen). The app I'm making will be useless if I can't figure out how to print out the contents of the UIView (or at the very least the UICollectionView) with the full content of the UICollectionView and the UIImageView.
I've been researching for a day and came up with the resources I will list below, but I still can't figure out how to accomplish my goal. Does anyone have any advice for me?
A possible alternative to printing out the Collection View would be to create a PDF or Image with the information contained within the collection view (one image and 3 labels per cell) without necessarily printing the collection view itself. If you can point out a way to do that, that would be equally helpful.
Thank you for your time!
My research results: (stack overflow wont let me post more than two links, so forgive the chopped up links) Apple documentation: (I can't make sense of this yet, but I'm trying to figure it out.) https://developer. apple .com /library/ios/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GeneratingPDF/GeneratingPDF.html
Crazy repository of frameworks, including pdf generators: github. com /vsouza/awesome-ios#pdf
How to convert a UIView to an image using swift: (I can't tell if this will take a screenshot of just what's on the page, or if it will take a screenshot of the whole view.) How to convert a UIview to a image
Apple function documentation: (This is a supplement to the above stackoverflow questions link.) developer. apple. com/library/ios/documentation/UIKit/Reference/UIKitFunctionReference/#//apple_ref/c/func/UIGraphicsGetImageFromCurrentImageContext
PDFGenerator: (This has the most potential, but I can't figure out how to use it yet.) https://github.com/sgr-ksmt/PDFGenerator