How to call a method every x seconds in Objective-C using NSTimer?
问题 I am using Objective-C, Xcode 4.5.1 and working on an app for the iPhone. I have a method A in which I want to call another method B to do a series of calculations every x seconds. In method A I start playing an audio file. Method B will monitor the audio every x seconds for the duration of the audio file. I have found NSTimer as a potential solution, but am having a hard time getting it to work/understanding it. I simply want to call Method B every x seconds and run its calculations, but