Keep MKMapSnapshotter as NSData in memory - Swift
问题 I'm trying to take a screenshot of my MKMapView. I usually achieved this using the below code in Objective C. I'm wondering how I would keep the NSData object in memory, rather than saving the image, and then reading from it straight away. I'm also wondering how this could be written in Swift - In particular, the completion handler part. I've looked at the docs - but unsure of syntax:https://developer.apple.com/library/prerelease/iOS/documentation/MapKit/Reference/MKMapSnapshotter_class/index