Calculate time elapsed between pressing the same button twice
问题 I've tried all the time calculating examples I found on this site but somehow I'm getting 0 as value every time. I'm new to IOS and the NSDate is giving me a run for it's money :) I want to record time A when I press button "startStop", and then record time B when I press it again. Pressing it a second time (deselecting) has to calculate the time elapsed between these 2 dates. So far I have this: -(IBAction)buttonClick { NSDate *startStopDate = [NSDate alloc]; NSDateFormatter *formatter= [