I'm trying to dismiss a modal controller then present a new model controller by pressing a button on the first modal controller. I've tried this:
dismiss(animated: true, completion: {_ in
self.navigateToAtmDetail(atmId:id)
})
but as soon the current view controller is dismissed it stays dismissed and doesn't navigate to the next controller. Also we are using nibs instead of storyboard and segues so I won't have access to those. Any idea how to dismiss the current modal view controller than present a new modal view controller?





