SRViewChangeDefinition Protocol Reference

Conforms to NSObject
Declared in SRViewChangeDefinition.h

Overview

Your UIViewController subclass can adopt this protocol to disable automatic view logging and counting.

Most of time, the appearance of a UIViewController on screen is counted as a “page view” by the SDK. Some container controllers, however, are not counted (e.g. UINavigationController). You may have your own custom controllers that you don’t wish to be counted (or containers that you think should be). This protocol enables an override of the default behavior.

Page View Behaviour

– shouldCountPageViews

Returns whether the SDK should count the appearance of this controller as a “page view”

- (BOOL)shouldCountPageViews

Return Value

YES if you want to count the current controller, otherwise NO

Declared In

SRViewChangeDefinition.h

View Change Behaviour

– isAutoViewChangeEnabled

Implement this method to control whether or not Replay records when this view controller appears. (Deprecated: v5.1.0)

- (BOOL)isAutoViewChangeEnabled

Return Value

YES if you want the default behaviour, NO if you want to disable.

Discussion

Implementation of this method is optional. (This method has no effect when Replay is not enabled.)

Declared In

SRViewChangeDefinition.h

Custom Log Properties

– sessionReplayViewName

You can optionally provide a custom name when Replay logs view changes. (Deprecated: v5.1.0)

- (NSString *)sessionReplayViewName

Return Value

The custom view name

Discussion

The default name will be the class name.

Implementation of this method is optional. (This method has no effect when Replay is not enabled.)

Declared In

SRViewChangeDefinition.h