The timer is not working in ios 10 and above ?

0 votes
asked Apr 26, 2017 by anonymous

  I am using the below code but its not working in IOS 10 and above

 Timer.scheduledTimer(timeInterval: timeoutInSeconds, target: self, selector: #selector(idleTimerExceeded), userInfo: nil, repeats: false)

1 Answer

0 votes
answered Apr 26, 2017 by admin (8,145 points)

Hi User

  I also faced the same issue try the below changes ,In my case it worked after I added to my method the @obj prefix

@objc func idleTimerExceeded{