I am basically trying to recreate whatsapp. My MainVC has a TableView that shows all current conversations and has a push sega in ChatVC to display the entire conversation.
When a user wants to start a new conversation, click the button in the upper right corner, and UserListVC will appear at the bottom and display a list of users.
My thinking here is that when the user clicks on the user, "UsersListVC" rejects (shows mainVC) and calls the function to open ChatVC. However, I could not successfully call the function after this error from MainVC.

Please, not right now, I do not click any data, I just want the segues to work correctly
MainVC.swift
func showChatVC() {
print("FUnction called")
let showChat = ChatVC()
navigationController?.pushViewController(showChat, animated: false)
}
UsersListVC.swift
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
dismiss(animated: true) {
MainVC().showChatVC()
}
}
, MainVC. , , ? UserListVC ChatVC