In my app I've got moment where I use timer to go from one view controller to next view controller, and it doesn't work. Could somebody tell me what's wrong?
class fifthViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let delay : Double = 2.0 // 2 seconds here
DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let IDKViewController = storyBoard.instantiateViewController(withIdentifier: "IDKview") as! IDKViewController
self.present(IDKViewController, animated:true, completion:nil)
}
}
}
-
—
Claude31
-
—
_Mdeveloper_
-
—
Claude31
Add a CommentYou should answer the other post ; better than creating a new one for the same question.
Well sorry Claude, but I answered
It seems your answers to some posts are not visible yet. And don't forget to close the threads, that makes it much easier to understand it is solved.