AppStateSubjectProtocol
public protocol AppStateSubjectProtocol : AppStateProviderDelegate
The interface of AppStateSubject
, allows us to better divide the logic and mock easier.
-
Undocumented
Declaration
Swift
associatedtype InstanceType
-
Undocumented
Declaration
Swift
static var shared: InstanceType { get }
-
Lock object for synchronizing access.
Declaration
Swift
var lock: AnyObject { get }
-
The app state events provider.
Declaration
Swift
var appStateProvider: AppStateProvider { get }
-
The current app state observers.
Declaration
Swift
var observers: [AppStateObserver] { get set }
-
States whether currently observing.
Note
when mocking set initial value to false.Declaration
Swift
var isObserving: Bool { get set }
-
add(observer:)
Extension methodAdds an observer to inform when state events are posted.
Declaration
Swift
public func add(observer: AppStateObservable)
-
remove(observer:)
Extension methodRemoves an observer to stop being inform when state events are posted.
Declaration
Swift
public func remove(observer: AppStateObservable)
-
appStateEventPosted(name:)
Extension methodDeclaration
Swift
public func appStateEventPosted(name: ObservationName)