ringcentral / engage-digital-messaging-ios

Engage Digital Messaging IOS SDK
Other
10 stars 6 forks source link

back button is not visible #38

Closed tosuccesspractice closed 2 years ago

tosuccesspractice commented 4 years ago

I integrate sdk 1.9.5 but when i show viewcontroller Dimelo i don't have back button here is a screen witch show what i m having

to show Dimelo Chat i'm doing something like that :

  static func showDimeloChat(containerView: UIView) {
    let appDelegate = UIApplication.shared.delegate as? AppDelegate
    if let dimelo = appDelegate?.dimelo {
        if let vc = dimelo.chatViewController() {
            containerView.addSubview(vc.view)
        }
    }
  }
Capture d'écran 2020-06-14 21 39 58
waelba commented 4 years ago

Hi @tosuccesspractice, You need to add rightBarButtonItem to your navigationItem by implementing dimeloDisplayChatViewController: method. You can follow our example in github here.

tosuccesspractice commented 4 years ago

hi @wa-el

I try this but i don't in function dimeloDisplayChatViewController

i enter in function like dimeloDidEndNetworkActivity but not in dimeloDisplayChatViewController

  func initView() {
   let dimelo = PartNavigator.showDimeloChat(containerView: self.containerDimelo)

   dimelo.delegate = self

}

func dimeloDisplayChatViewController(_ dimelo: Dimelo!) {
    let dimeloViewController = dimelo.chatViewController()
    let menu_button_ = UIBarButtonItem(image: UIImage(named: "menu"),
                                       style: UIBarButtonItem.Style.plain ,
        target: self, action: "OnMenuClicked:")
    dimeloViewController?.navigationItem.rightBarButtonItem = menu_button_
    dimeloViewController?.title = "zz"
    dimeloViewController?.navigationController?.title = "zzsdfd"

    dimeloViewController?.navigationItem.backBarButtonItem = menu_button_
}

func dimeloDidEndNetworkActivity(_ dimelo: Dimelo!) {

}
func dimeloDidBeginNetworkActivity(_ dimelo: Dimelo!) {

}
func dimeloChatWillAppear(_ notification: Notification!) {

}
func dimeloChatDidAppear(_ notification: Notification!) {

}
func dimeloUnreadCountDidChange(_ notification: Notification!) {

}
func dimeloChatDidDisappear(_ notification: Notification!) {

}
func dimeloChatWillDisappear(_ notification: Notification!) {

}
func dimeloChatDidSendMessage(_ notification: Notification!) {

}
func dimeloWelcomeMessageDidChange(_ notification: Notification!) {

}
func dimeloChatDidReceiveNewMessages(_ notification: Notification!) {

}

the function dimeloDisplayChatViewController is not called others functions of delegate dimeloDidEndNetworkActivity and dimeloDidBeginNetworkActivity are called