Warning: Attempt to present iChat.ChatMessagesController: 0x7fee42679fd0> on iChat.NewMessageController: 0x7fee42529e60> whose view is not in the window hierarchy!
i have tableview that is created programmatically and other view in storyboard that iam trying to present from selected a row from the table view.
Class : ChatMessagesController
Storyboard ID ChatMessagesController
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
dismiss(animated: true) {
let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let newViewController = storyBoard.instantiateViewController(withIdentifier: "ChatMessagesController") as! ChatMessagesController
self.present(newViewController, animated: true, completion: nil)
}
}