Navigation bar glitch | Community
Skip to main content

Navigation bar glitch

  • August 5, 2022
  • 2 replies
  • 0 views

We found that when a user opens ZenDesk chat and goes back, the navigation bar blinks/flashes once with blue colour.
After that, it starts to happen in both ways, on the appearing chat screen and disappearing.
Condition:
iOS 15.5
ZendeskChatSDK 2.12.0
Chat pushes in UINavigationController as the second (not first) viewController.
The root view controller was presented as a modal.


Is anyone has the same issue? If so, what is your workaround for this?

2 replies

Eric27
  • August 8, 2022
Hey Maxim,

Can you share the code snippets of how you're initializing the sdk and presenting the view?

Thanks!

  • Author
  • August 8, 2022

Hey Eric,
thanks for helping.
The next code is from a demo app that also has this glitch but visibly less. 
to see it better, use slow animation on a simulator and use a dark background for the navigation bar.

Chat.initialize(accountKey: accountKey)
Chat.instance?.resetIdentity(nil)
let chatEngine = try ChatEngine.engine()
let chatViewController = try Messaging.instance.buildUI(engines: [chatEngine], configs: [])
navigationController?.pushViewController(chatViewController, animated: true)

The code is a bit complicated in our main application but mainly the same.

Chat.instance?.configuration.department = department
let formConfiguration = ChatFormConfiguration(
    name: .required,
    email: .required,
    phoneNumber: .hidden,
    department: .hidden
)

let chatConfiguration = ChatConfiguration()
chatConfiguration.preChatFormConfiguration = formConfiguration
chatConfiguration.isPreChatFormEnabled = some logic

let messagingConfiguration = MessagingConfiguration()
messagingConfiguration.name = answerBotName

let chatEngine = try ChatEngine.engine()
let viewController = try Messaging.instance.buildUI(engines: [chatEngine], configs: [chatConfiguration, messagingConfiguration])
viewController.overrideUserInterfaceStyle = .dark
navigationController?.pushViewController(viewController, animated: true)

P.S. Not sure how it's important but the viewController who presents the chat should be presented modally