Presenting ViewController after alert

Hey everyone! Still quite new at coding so any help would be much appreciated, so I have a quiz app and there may be over 100 questions but once it gets to a certain number it sends an alert, after the alert I want it to go back to the main screen, thoughts?

Code Block
         if questionsAsked >= 4 {
          // alert user that game is over
          let alert = UIAlertController(title: "Done", message: "You beat the game", preferredStyle: .alert)
          alert.addAction(UIAlertAction(title: "Dismiss", style: .cancel, handler: nil))
          present(alert, animated: true)
        }

Answered by tomdotcom12 in 667891022
SOLVED: Was a matter off hierarchy and wasn't putting the change view inside the alert
Accepted Answer
SOLVED: Was a matter off hierarchy and wasn't putting the change view inside the alert

SOLVED: Was a matter off hierarchy and wasn't putting the change view inside the alert 

When your issue is SOLVED, please mark the reply (in this case, of your own) as the solution.
Presenting ViewController after alert
 
 
Q