最近搜索


没有最近搜索

iOS new messaging SDK, no header or close button



已于 2022年2月11日 发布

Hey,

I'm using the new iOS messaging SDK.
The chat widget is working fine, but there's no header and no close button.

Can these be added to the new iOS Messaging chat?

This is my swift implementation:

    guard let viewController = Zendesk.instance?.messaging?.messagingViewController() else { return }

   

    let navigationController = UIApplication.shared.windows.first!.rootViewController;

   

    navigationController?.show(viewController, sender: self);

1

4

4 条评论

image avatar

Mick O'Donnell

Zendesk Product Manager

Hi Tiberiu,

Thanks for reaching out. The header and back button (no close button) shouldn't appear by default. I'll move this post into a support ticket, as we most likely need to look at your SDK integration more closely.

0


Hey, thanks for reaching out, so this is the default behavior of the widget?

Is there documentation of how to add the header and the back button?

0


Is there any progress?

0


I managed to get around this issue by wrapping the Zendesk Conversations view controller in a UINavigationController, then setting a navigationItem with a rightBarButtonItem on the Zendesk conversations view controller, and then display the navigation controller. The button then references a handler function to dismiss the view Example code as follows:

if let zendeskChatVC = Zendesk.instance?.messaging?.messagingViewController(){

            let navController = UINavigationController()

            navController.viewControllers = [zendeskChatVC]

            zendeskChatVC.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Done", style: .plain, target: self, action: z #selector(self.closeZendeskChatNavController))

                  DispatchQueue.main.async {

                self.present(navController, animated: true)

            }

}

0


请先登录再写评论。

找不到所需的内容?

新建帖子