Reputation: 3711
I am trying to customise the UI of AccountKit for iOS and I am finding some troubles as the documentation is not very clear (plus it's outdated).
I want to return view on the designed methods of the AdvancedUIManager
. The issue I'm finding is:
UIView?
. UIView
, nothing shows.UILabel
, it works.For example, this works:
func headerView(for state: LoginFlowState) -> UIView? {
let label = UILabel()
label.text = "HEEEY*"
return label
}
But this doesn't:
func bodyView(for state: LoginFlowState) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 300))
view.backgroundColor = .green
return view
}
I want to be able to return a custom UIView
on these methods:
func headerView(for state: LoginFlowState) -> UIView?
func footerView(for state: LoginFlowState) -> UIView?
func bodyView(for state: LoginFlowState) -> UIView?
Does anyone know how to make it work?
Thank you
Upvotes: 1
Views: 71