twostraws / HackingWithSwift

The project source code for Hacking with iOS.

Repository from Github https://github.comtwostraws/HackingWithSwiftRepository from Github https://github.comtwostraws/HackingWithSwift

Project 30 timer code not matching with book text

jakedgrant opened this issue · comments

Code in project file:

animTimer = Timer.scheduledTimer(withTimeInterval: 5, repeats: true) { timer in

Code in book text:

self.animTimer = Timer.scheduledTimerWithTimeInterval(5, target: self, selector: #selector(animateImage), userInfo: nil, repeats: true)

Looks like the book text needs updated since scheduledTimer(withTimeInterval:repeats:block) is the current syntax.

Thanks! This will be fixed in the next update.