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