@protocol HUBContentReloadPolicy <NSObject>

Protocol used to define objects that represent a policy for when the content for a view should be reloaded

To define a reload policy, conform to this protocol in a custom object and pass it when registering your feature with HUBFeatureRegistry. A reload policy can be used to implement custom rules around when to reload a given view.

Each application using the Hub Framework also has a default content reload policy used for features that do not declare their own. This reload policy is passed when setting up HUBManager.

  • Return whether the content for a view should be reloaded

    The Hub Framework will call this method every time a view that has already loaded a view model is about to appear on the screen. The passed currentViewModel can be used to inspect the current content of the view, as well as the view model’s buildDate to determine whether a view should be reloaded or not.



    - (BOOL)shouldReloadContentForViewURI:(nonnull NSURL *)viewURI
                             (nonnull id<HUBViewModel>)currentViewModel;



    The URI of the view


    The current view model of the view