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.
In addition, when SessionReplay is enabled, it logs when view controllers appear in order to logically divide a recording. If you want to disable this behaviour for a given view controller, you must adopt this protocol.
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 Session Replay records when this view controller appears.
- (BOOL)isAutoViewChangeEnabled
Return Value
YES if you want the default behaviour, NO if you want to disable.
Discussion
Implementation of this method is optional.
Declared In
SRViewChangeDefinition.h
Custom Log Properties
– sessionReplayViewName
You can optionally provide a custom name when Session Replay logs view changes.
- (NSString *)sessionReplayViewName
Return Value
The custom view name
Discussion
The default name will be the class name.
Implementation of this method is optional.
Declared In
SRViewChangeDefinition.h