In my app I have a piece of code that allows to go automatically from one Vc to another Vc after a short period of time. The problem is that when the second Vc pops out id doesn't cover up all the screen. How can I make it cover up the whole screen and not let the user go back? Here is the code:
import UIKit
class InitialViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let delay : Double = 2.0 // 4 seconds here
DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let firstViewController = storyBoard.instantiateViewController(withIdentifier: "firstViewController") as! firstViewController
self.present(firstViewController, animated:true, completion:nil)
}
}
}