CLASS
BankIdViewController
Contents
- Properties
bankIdImageViewprogressBarcountLabelbankIdStackViewexpandableVieworLabelcancelButton
- Methods
init(_:style:commonStyle:notificationCenter:)init(_:style:commonStyle:)init(coder:)deinithasLoading()viewDidLoad()viewWillAppear(_:)viewWillDisappear(_:)handleLinkItemModels(_:)update(model:)apply(style:)
open class BankIdViewController: BaseViewController<BankIdModel, BankIdViewControllerStyle>, PollingModelUpdatable
A UIViewController that presents a polling interface for BankID authentication.
Properties
bankIdImageView
public lazy var bankIdImageView = {
let imageView = UIImageView()
imageView.image = uiStylableThemeDelegate?.imageOptional(named: "hui_ic_bankid_login_symbol")
imageView.accessibilityIdentifier = "bankIdImageView"
imageView.contentMode = .scaleAspectFit
return imageView
}()
An imageView that represents the bankID logo.
progressBar
public lazy var progressBar: UIProgressView = {
let progressView = UIProgressView()
progressView.progress = 0.0
progressView.accessibilityIdentifier = "progressView"
progressView.transform = CGAffineTransform(scaleX: 1.0, y: 3.0)
return progressView
}()
A progress bar for the polling.
countLabel
public lazy var countLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.textAlignment = .center
label.setContentHuggingPriority(.defaultLow, for: .horizontal)
label.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
label.accessibilityIdentifier = "countLabel"
return label
}()
A label that represents the remaining time for the polling.
bankIdStackView
public lazy var bankIdStackView: UIStackView = {
let stack = UIStackView(arrangedSubviews: [
progressBar, countLabel, internalExpandableView
])
stack.translatesAutoresizingMaskIntoConstraints = false
stack.axis = .vertical
stack.alignment = .fill
stack.distribution = .fill
stack.accessibilityIdentifier = "bankIDStackView"
stack.backgroundColor = .clear
return stack
}()
A stackView that holds the progressBar, countLabel, expandableView, orLabel and cancelButton.
expandableView
public var expandableView: UIControl
An expandable view for bankID instructions.
orLabel
public lazy var orLabel: UILabel = {
let label = UILabel()
label.textAlignment = .center
label.numberOfLines = 0
label.setContentHuggingPriority(.defaultLow, for: .horizontal)
label.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
label.accessibilityIdentifier = "orLabel"
return label
}()
A label that represents the Or
cancelButton
public var cancelButton: UIButton
A cancel button.
Methods
init(_:style:commonStyle:notificationCenter:)
public init(
_ model: any BankIdModel,
style: BankIdViewControllerStyle,
commonStyle: HaapiUIViewControllerStyle,
notificationCenter: NotificationCenter = NotificationCenter.default
)
init(_:style:commonStyle:)
override public convenience init(
_ model: any BankIdModel,
style: BankIdViewControllerStyle,
commonStyle: HaapiUIViewControllerStyle
)
init(coder:)
deinit
deinit
hasLoading()
override open func hasLoading() -> Bool
viewDidLoad()
override open func viewDidLoad()
viewWillAppear(_:)
override open func viewWillAppear(_ animated: Bool)
viewWillDisappear(_:)
override open func viewWillDisappear(_ animated: Bool)
handleLinkItemModels(_:)
override open func handleLinkItemModels(_ linkItemModels: [any LinkItemModel])
Parameters
| Name | Description |
|---|---|
| linkItemModels | An array of LinkItemModel. |
update(model:)
public func update(model: any PollingModel)
Parameters
| Name | Description |
|---|---|
| model | The latest PollingModel |
apply(style:)
override public func apply(style: BankIdViewControllerStyle)