Edit

Share via


WKWebView.TakeSnapshot Method

Definition

Overloads

TakeSnapshot(WKSnapshotConfiguration, Action<NSImage,NSError>)
TakeSnapshot(WKSnapshotConfiguration, Action<UIImage,NSError>)

Takes a snapshot of the current viewport and runs a handler that takes the resulting image and any error encountered.

TakeSnapshot(WKSnapshotConfiguration, Action<NSImage,NSError>)

[Foundation.Export("takeSnapshotWithConfiguration:completionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 13, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void TakeSnapshot (WebKit.WKSnapshotConfiguration snapshotConfiguration, Action<AppKit.NSImage,Foundation.NSError> completionHandler);
abstract member TakeSnapshot : WebKit.WKSnapshotConfiguration * Action<AppKit.NSImage, Foundation.NSError> -> unit
override this.TakeSnapshot : WebKit.WKSnapshotConfiguration * Action<AppKit.NSImage, Foundation.NSError> -> unit

Parameters

snapshotConfiguration
WKSnapshotConfiguration
completionHandler
Action<NSImage,NSError>
Attributes

Applies to

TakeSnapshot(WKSnapshotConfiguration, Action<UIImage,NSError>)

Takes a snapshot of the current viewport and runs a handler that takes the resulting image and any error encountered.

[Foundation.Export("takeSnapshotWithConfiguration:completionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void TakeSnapshot (WebKit.WKSnapshotConfiguration snapshotConfiguration, Action<UIKit.UIImage,Foundation.NSError> completionHandler);
abstract member TakeSnapshot : WebKit.WKSnapshotConfiguration * Action<UIKit.UIImage, Foundation.NSError> -> unit
override this.TakeSnapshot : WebKit.WKSnapshotConfiguration * Action<UIKit.UIImage, Foundation.NSError> -> unit

Parameters

snapshotConfiguration
WKSnapshotConfiguration

The snapshot configuration to use.

This parameter can be null.

completionHandler
Action<UIImage,NSError>

A completion handler that receives the image (or null if an error occurred) and the error (or null if no error occurred).

Attributes

Applies to