-2

I am doing one application.In that,i am calling one method for every 10 seconds using the timer.But after sometime that method is not calling. So,may i know the reason for why timer is stopped.

venkat
  • 345
  • 8
  • 21

2 Answers2

1

If there is a ScrollView scrolling, the timer in NSDefaultRunLoopMode will be stopped.

You can use this to fix it: [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];

mmackh
  • 3,550
  • 3
  • 35
  • 51
virgiltang
  • 36
  • 2
0

If you are checking Timer in Foreground and background, Timer will work continuously in foreground, But in background it will work only 10 mins, After that timer will not work.

Hari c
  • 1,139
  • 11
  • 11