ContentController

public protocol ContentController : AnyObject

Represents a class that loads and refreshes content.

  • The StatefulViewController associated with the ContentController instance

    This property will typically be declared as a weak reference to the associated StatefulViewController. This is to prevent a strong reference cycle between the StatefulViewController and the ContentLoader.

    Declaration

    Swift

    var statefulViewController: StatefulViewController? { get set }
  • Loads the content.

    Declaration

    Swift

    func loadContent()

    Parameters

    completion

    A LoadContentCompletion closure to be executed on load content completion.

  • Refreshes the content.

    By default, this will just call loadContent().

    Declaration

    Swift

    func refreshContent()

    Parameters

    completion

    A LoadContentCompletion closure to be executed on refresh content completion.