Lukas H.
Lukas H.

Reputation: 123

Call function for some time and than call another function - NSTimer

I have two functions. I want to call first function for example - 60 seconds and than call second function. How to do it with NSTimer? Thanks.

Upvotes: 0

Views: 53

Answers (1)

Axel
Axel

Reputation: 778

try

func firstFunction() {

    Timer.scheduledTimer(timeInterval: 60.0, target: self, selector: #selector(secondFunction), userInfo: nil, repeats: false)
}
func secondFunction() {

}

Upvotes: 2

Related Questions