Instance Property


The reason for taking the upcoming snapshot.


@property(readonly) WKSnapshotReason reasonForSnapshot;


You can use this property to change your application's appearance before a snapshot is taken. For example, if the property contains an WKSnapshotReasonAppBackgrounded value, you'd probably want to capture the app's current state, and no changes are necessary. However, if the property contains a WKSnapshotReasonReturnToDefaultState value, you may want to navigate back to the root view controller before taking the snapshot.

For a list of possible reasons for taking the snapshot, see WKSnapshotReason.