Why does the MessageKit (`JSQMessagesViewController` replacement) input field disappears when VC segues from-right?

只愿长相守 提交于 2020-01-02 10:15:23

问题


I am trying to integrate MessageKit (JSQMessagesViewController replacement) into my project.

From my didSelectRowAt of messages table I segue to my ConversationVC which subclasses MessagesViewController (MessageKit requirement)

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {

    guard let conversationVC = storyboard?.instantiateViewController(withIdentifier: "ConversationVC") as? ConversationVC else { return }
    self.presentDetail(conversationVC)

    }//end func

This segues perfectly fine using the following custom function to present a VC:

    func presentDetail(_ viewControllerToPresent: UIViewController){
        //constant to hold animation
        let transition = CATransition()

        transition.duration =  0.20 //seconds
        transition.type = kCATransitionPush
        transition.subtype = kCATransitionFromRight
        self.view.window?.layer.add(transition, forKey: kCATransition)

        present(viewControllerToPresent, animated: false, completion: nil)

    }//end func

The problem is that once ConversationVC is presented from-right, the input message field at the bottom disappears If I use a standard segue (modally) then it shows.

来源:https://stackoverflow.com/questions/51585623/why-does-the-messagekit-jsqmessagesviewcontroller-replacement-input-field-di

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!