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.

enter image description here

0

There are 0 best solutions below