StatefulViewController
open class StatefulViewController : NibViewController, Navigator
A NibViewController subclass that manages and displays states of content.
This view controller handles states of loading content by displaying the appropriate child view controller depending of the state.
Note
Being a subclass of aNibViewController, an associated nib file is required with outlets connected.
-
Enumeration of states of the
See moreStatefulViewController.Declaration
Swift
public enum State : Equatable -
An object conforming to the
ContentLoaderprotocol.Declaration
Swift
open var contentController: ContentController? -
The empty state view controller to display upon loading of empty content. This by default has a value of a
DefaultReloadViewController.Declaration
Swift
open var emptyViewController: ReloadableViewController -
The error state view controller to display upon loading error. This by default has a value of a
DefaultReloadViewController.Declaration
Swift
open var errorViewController: ReloadableViewController -
The loading state view controller to display upon loading of the content. This by default has a value of a
DefaultLoadingViewController.Declaration
Swift
open var loadingViewController: LoadableViewController -
The screen name used to log in analyitics in
setup().Declaration
Swift
open var screenName: String -
The current state of the
StatefulViewController.Declaration
Swift
open var state: StatefulViewController.State { get set }
-
Returns a newly initialized stateful view controller with the specified content loader and view controller states.
Declaration
Swift
public convenience init(controller: ContentController?, loading: LoadableViewController? = nil, empty: ReloadableViewController? = nil, error: ReloadableViewController? = nil)Parameters
loaderThe content loader
-
Declaration
Swift
override open func setup()
View on GitHub
StatefulViewController Class Reference