Freigeben über


WKWebView.TakeSnapshot Methode

Definition

Überlädt

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

Erstellt eine Momentaufnahme des aktuellen Viewports und führt einen Handler aus, der das resultierende Image und alle aufgetretenen Fehler übernimmt.

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

Parameter

snapshotConfiguration
WKSnapshotConfiguration
completionHandler
Action<NSImage,NSError>
Attribute

Gilt für:

TakeSnapshot(WKSnapshotConfiguration, Action<UIImage,NSError>)

Erstellt eine Momentaufnahme des aktuellen Viewports und führt einen Handler aus, der das resultierende Image und alle aufgetretenen Fehler übernimmt.

[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

Parameter

snapshotConfiguration
WKSnapshotConfiguration

Die zu verwendende Momentaufnahmekonfiguration.

Dieser Parameter kann null sein.

completionHandler
Action<UIImage,NSError>

Ein Vervollständigungshandler, der das Image empfängt (oder null wenn ein Fehler aufgetreten ist) und den Fehler (oder null wenn kein Fehler aufgetreten ist).

Attribute

Gilt für: