Instance Method

takeSnapshotWithConfiguration:completionHandler:

Takes a snapshot of the view's visible viewport.

Declaration

iOS, Mac Catalyst
- (void)takeSnapshotWithConfiguration:(WKSnapshotConfiguration *)snapshotConfiguration completionHandler:(void (^)(UIImage *snapshotImage, NSError *error))completionHandler;
macOS
- (void)takeSnapshotWithConfiguration:(WKSnapshotConfiguration *)snapshotConfiguration completionHandler:(void (^)(NSImage *snapshotImage, NSError *error))completionHandler;