I am trying to execute a function after the view has appeared.
I have tried series of steps I tried wait()
override func viewDidLoad()
{
super.viewDidLoad()
let w = UnsafeMutablePointer<Int32>.allocate(capacity: 20)
self.title = "Quiz Section"
wait(w)
Function()
}
I tried sleep()
override func viewDidLoad()
{
super.viewDidLoad()
sleep(10)
Function()
}
I even tried viewWillAppear but none of them seemed to work. I want that once the view is in front then the function executes. Any help?
viewDidAppear?