Custom UI AccountKit for iOS

71 Views Asked by At

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:

  • This methods are made to return a UIView?.
  • If I am returning a UIView, nothing shows.
  • If I return any other UI object like a 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

0

There are 0 best solutions below