interactionActivityTrackingBaseName
The base name the view controller uses for logging signposts that annotate user interactions.
Declaration
var interactionActivityTrackingBaseName: String? { get set }Discussion
To help you investigate perfomance issues in your app, UIKit annotates significant user interactions with signpost messages. It creates activities that span the duration of the interaction and sets one of the doc://com.apple.documentation/documentation/foundation/processinfo/activityoptions for tracking: animationTrackingEnabled or trackingEnabled.
Use this property to customize the tracking name the activity uses in the signpost messages. Scroll views that can derive their enclosing view controller also use the tracking name to annotate interactive dragging and programmatic scrolling events.
In many cases, you can set the tracking name once in init, viewDidLoad, or awakeFromNib. You can, however, change the tracking name in response to different configurations. In this example, the tracking name updates in response to toggling a switch.
When not explicitly set, custom subclasses use their class name as the base name, while base classes may use the accessibilityIdentifier of the controller’s managed view.
If the view controller is a prominent child view controller of a UINavigationController, UITabBarController, or UISplitViewController, the parent may derive a name by applying a prefix:
UINC-for a navigation controllerUITBC-for a tab bar controllerUISVC-for a split view controller
The system applies a suffix to the base name to denote the type of user interaction:
-Appearingwhen presenting the view controller-Disappearingwhen dismising the view controller-Scrollingwhen scrolling the view controller’s managedUIScrollView-Draggingwhen dragging the view controller’s managedUIScrollView
For example, UIKit uses the tracking name UINC-MyListTableViewController-Appearing in a signpost when presenting a navigation controler with a MyListTableViewController prominent child controller.