Zendesk build UI not show navigation bar in Xcode 11.6

423 views Asked by At

I have implemented Zendesk SDK on Xcode 11.6 but the navigation bar doesn't show.

My code is >>>>

  let viewController = RequestUi.buildRequestUi()
  let dismissBtn = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(dismissSupportPage))
  viewController.navigationItem.rightBarButtonItem = dismissBtn
  self.present(viewController, animated: true)
1

There are 1 answers

1
Glenn Posadas On BEST ANSWER

Welcome to Stackoverflow.

You can simply embed the requestedUI of ZendeskSDK in a UINavigationController if you prefer presenting instead of pushing.

 let viewController = RequestUi.buildRequestUi()
  let dismissBtn = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(dismissSupportPage))
  viewController.navigationItem.rightBarButtonItem = dismissBtn
  self.present(UINavigationController(rootViewController: viewController), animated: true)

But remember, whenever the requestedUI is embed in a navigationController, the Zendesk SDK automatically adds the navigation barbutton items to the navigation bar.