3

My question is which one is better to use?

As NSTimer in turn uses the CFRunLoopTimer object. What works better then other i got nothing about it on any site i googled for it but nothing, i got documents regarding both from Apple's documents but after reading them i doesn't understand or clear about what to use NSTimer or CFRunLoopTimer? any help will be appreciated.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
The iOSDev
  • 5,237
  • 7
  • 41
  • 78

1 Answers1

1

From the docs:

CFRunLoopTimer is “toll-free bridged” with its Cocoa Foundation counterpart, NSTimer.

Translation:

It doesn’t matter, so use NSTimer unless you’re knee deep in CF-code anyways or want to do funky stuff/associate non-object data with your timer.

danyowdee
  • 4,658
  • 2
  • 20
  • 35