Thanks, but a bit more help please.
Here is what I have:
UIGraphicsBeginPDFContextToData(pdfData, pdfPageBounds, nil)
UIGraphicsBeginPDFPageWithInfo(pdfPageBounds, nil)
let pdfContext = UIGraphicsGetCurrentContext()!
statsTable.layer.render(in: pdfContext)
And I've defined the rectangle where I want the UIImage to go:
let playerKillMapRect = CGRect(x: 640, y: 10, width: 330, height: 330)
I've tried this, but it's not working:
pdfContext.draw(image: CGImage, in: CGRect)
I feel like I'm missing something very simple. I've tried converting the UIImage into a CGImage and then calling the above line, but that doesn't work either.
What function call am I missing?
----------------------------
OK, figured it out. And I was missing something very simple:
playerKillMap.draw(in: playerKillMapRect)
Where playerKillMap is the UIImage.
Duh. Thanks for setting me in the right direction.