SASReportViewControllerDelegate

@objc
public protocol SASReportViewControllerDelegate : NSObjectProtocol

Delegate methods for the SASReportViewController. The methods on this protocol allow the delegate to interact with the behavior of the ReportViewController.

Since

since 26.1.0
  • the report viewer will show a data tip. This is the delegate’s opportunity to veto the data tip from the ReportViweContorller, as well as handling the user’s selection.

    Since

    since 26.1.0

    Declaration

    Swift

    func willHandleDataTip(info: SASDataTip) -> Bool

    Parameters

    info

    SASDataTip instance describing the users selection

    Return Value

    Bool indicating if the ReportViewController should display a data tip or not. true indicates that the delegate has handled the event, and the default data tip should not be displayed. false indicates that the data tip should be displayed.

  • Called if the delegate returned true from willHandleDataTip

    Since

    since 26.1.0

    Declaration

    Swift

    func showDataTip(info: SASDataTip)

    Parameters

    info

    SASDataTip instance describing the users selection

  • The report object data tip needs to be hidden. This can occur for various reasons such as the user tapped in the background of a visual to trigger a data tip dismiss.

    This method will only be called if willHandleDataTip returns true.

    Since

    since 26.1.0

    Declaration

    Swift

    @objc
    func hideDataTip(info: SASDataTip)
  • the report viewer will optionally request a view to be used when indicating the report loading activity

    Since

    since 26.1.0

    Declaration

    Swift

    @objc
    func reportLoadingActivityView() -> UIView

    Return Value

    the user provided UIView, or UIView container that will be centered in the SASReportViewController view to indicate the report is loading. The default is a standard UIActivityIndicatorView spinner

  • the report viewer will optionally notify that the report loading activity has begun.

    Since

    since 26.1.0

    Declaration

    Swift

    @objc
    func reportLoadingActivityViewStarting(_ reportLoadingActivityView: UIView)

    Return Value

    • none
  • the report viewer will optionally notify that the report loading activity has stopped, usually due to report has completed loading.

    Since

    since 26.1.0

    Declaration

    Swift

    @objc
    func reportLoadingActivityViewStopping(_ reportLoadingActivityView: UIView) -> Bool

    Return Value

    • false, if the default report view controller should not remove the custom activity view; if returning false, the delegate is responsible from removing the custom activity view from the superview