cxReplay - Paging

By default, cxReplay divides a recording by UIViewController and each division is referred to as a page. When a client views a replay, they see these divisions as page markers and each page in the replay has a title. By default, this title is the classname of the UIViewController.

However, there are some instances where this default behaviour may not be desirable, e.g., if the client is presenting a modal UIViewController. In these cases, the client can configure the default paging behaviour by having the UIViewContoller adhere to the provided SRViewChangeDefinition protocol.

Customizing Page Titles

If the client wants a more human readable page title, they can implement the sessionReplayViewName method defined in the SRViewChangeDefinition protocol.

MYCustomViewController.h

@interface MYCustomViewController : UIViewController <SRViewChangeDefinition>
@end

MYCustomViewController.m

@implementation MYCustomViewController
- (NSString *)sessionReplayViewName {
    return @"My Custom View Controller";
}
@end

Excluding Pages

UIViewControllers can be excluded from automatic paging by implementing the isAutoViewChangeEnabled method.

@implementation MYModalViewController : UIViewController
- (BOOL)isAutoViewChangeEnabled {
    return NO;
}
@end

Adding Custom Page Changes

If significant layout changes are made within a single UIViewController, it may be useful to insert custom page markers to highlight those changes in the replay. To add a custom page change, use the following code:

[ForeSee logReplayPageChange:@"THE PAGE NAME"];

The page name persists as the name of the current page in the replay until another page change is invoked automatically by a change in UIViewController or by another custom page change.

Handling Container ViewControllers

By default, the automatic paging feature does not mark instances of UITabViewController or UINavigationController, but does mark its child view controllers.

Other articles in this section:

  1. cxReplay Overview
  2. Sessions
  3. Paging (current article)
  4. Masking
  5. Performance
  6. Limitations