我正在尝试将 $(`tr[data-title='three'][data-year='2017']`).css('background-color', 'green');
(替代MessageKit
)集成到我的项目中。
从我的JSQMessagesViewController
消息表中,我选择到didSelectRowAt
的子类,ConversationVC
是MessagesViewController
的子类
MessageKit
使用以下自定义功能来呈现VC可以很好地进行搜索:
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
guard let conversationVC = storyboard?.instantiateViewController(withIdentifier: "ConversationVC") as? ConversationVC else { return }
self.presentDetail(conversationVC)
}//end func
问题在于,一旦 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
从右出现,底部的输入消息字段就消失了。如果我(标准地)使用标准segue,则会显示出来。