CLASS
PollingViewController
Contents
- Methods
init(_:style:commonStyle:notificationCenter:)
init(_:style:commonStyle:)
init(coder:)
deinit
viewDidLoad()
viewWillAppear(_:)
viewWillDisappear(_:)
update(model:)
hasLoading()
apply(style:)
open class PollingViewController: BaseViewController<PollingModel, PollingViewControllerStyle>
A UIViewController
instance that is capable of displaying a polling interface that allows for automatic or manual user interaction triggered polling.
Actions are submited using delegation callback via HaapiFlowViewControllerDelegate
reference stored in haapiFlowViewControllerDelegate
property.
Methods
init(_:style:commonStyle:notificationCenter:)
public init(
_ model: any PollingModel,
style: PollingViewControllerStyle,
commonStyle: HaapiUIViewControllerStyle,
notificationCenter: NotificationCenter = NotificationCenter.default
)
Constructor for the UIViewController specialized for Polling representation.
- Parameters:
- model: The model that conforms to
PollingModel
to present in the UIViewController. - style: The style that conforms to
UIStyle
and is applied to the PollingViewController. - commonStyle: The common style definitions for components used in HaapiUIViewController.
- notificationCenter: The notification to register app lifecycle event observation.
- model: The model that conforms to
Parameters
Name | Description |
---|---|
model | The model that conforms to PollingModel to present in the UIViewController. |
style | The style that conforms to UIStyle and is applied to the PollingViewController. |
commonStyle | The common style definitions for components used in HaapiUIViewController. |
notificationCenter | The notification to register app lifecycle event observation. |
init(_:style:commonStyle:)
override public convenience init(
_ model: any PollingModel,
style: PollingViewControllerStyle,
commonStyle: HaapiUIViewControllerStyle
)
init(coder:)
deinit
deinit
viewDidLoad()
override open func viewDidLoad()
viewWillAppear(_:)
override open func viewWillAppear(_ animated: Bool)
viewWillDisappear(_:)
override open func viewWillDisappear(_ animated: Bool)
update(model:)
public func update(model: PollingModel)
Updates current model and updates the view's content
- Parameters:
- model the
PollingModel
with view model information to update the current state
- model the
Parameters
Name | Description |
---|---|
model the | PollingModel with view model information to update the current state |
hasLoading()
override public func hasLoading() -> Bool
apply(style:)
override public func apply(style: PollingViewControllerStyle)