ViewToImage A simple helper to create a UIView or NSView as an image. Features Provides extensions of UIView and NSView Set image scale to current window scale Requirements iOS 11+, macOS 10.13+ How to use import ViewToImage let capturedImage = view.asImage() // optional