VISPERAppType
public protocol VISPERAppType : ReduxApp, WireframeApp
A SwiftyVisper application type, containing all dependencies which should be configured by features
-
Undocumented
Declaration
Swift
associatedtype ApplicationState
-
observable app state property
Declaration
Swift
var state: ObservableProperty<ApplicationState> { get }
-
the wireframe responsible for routing between your view controllers
Declaration
Swift
var wireframe: Wireframe { get }
-
Undocumented
Declaration
Swift
var redux: Redux<ApplicationState> { get }
-
Add a feature to your application
Throws
throws errors thrown by your feature observers
Note
A Feature is an empty protocol representing a distinct funtionality of your application. It will be provided to all FeatureObservers after addition to configure and connect it to your application and your remaining features. Have look at LogicFeature and LogicFeatureObserver for an example.
Declaration
Swift
func add(feature: Feature) throws
Parameters
feature
your feature
-
Add an observer to configure your application after adding a feature. Have look at LogicFeature and LogicFeatureObserver for an example.
Declaration
Swift
func add<T>(featureObserver: T) where T : StatefulFeatureObserver, Self.ApplicationState == T.AppState
Parameters
featureObserver
an object observing feature addition
-
Add a controller that can be used to navigate in your app. Typically this will be a UINavigationController, but it could also be a UITabbarController if you have a routing presenter that can handle it. Be careful you can add more than one viewControllers if your RoutingPresenters can handle different controller types or when the active ‘rootController’ changes. The last added controller will be used first. The controller will not be retained by the application (it is weakly stored), you need to store a link to them elsewhere (if you don’t want them to be removed from memory).
Declaration
Swift
func navigateOn(_ controller: UIViewController)
Parameters
controller
a controller that can be used to navigte in your app
-
return the first navigatableController that matches in a block
Declaration
Swift
func controllerToNavigate(matches: (_ controller: UIViewController?) -> Bool) -> UIViewController?
-
add(controllerToNavigate:)
Extension methodDeclaration
Swift
public func add(controllerToNavigate: UIViewController)