¡@

Home 

2014/10/15 ¤U¤È 10:15:06

iphone Programming Glossary: triggertimer

iPhone-SDK:Call a function in the background?

http://stackoverflow.com/questions/1421817/iphone-sdkcall-a-function-in-the-background

. void setupTimer NSTimer timer NSTimer timerWithTimeInterval 10 60 target self selector @selector triggerTimer userInfo nil repeats YES NSRunLoop mainRunLoop addTimer timer forMode NSRunLoopCommonModes void triggerTimer NSTimer.. triggerTimer userInfo nil repeats YES NSRunLoop mainRunLoop addTimer timer forMode NSRunLoopCommonModes void triggerTimer NSTimer timer Do your stuff If your stuff here takes a long time and you can not hold up the main thread then either call.. pool NSAutoreleasePool alloc init NSTimer timer NSTimer timerWithTimeInterval 10 60 target self selector @selector triggerTimer userInfo nil repeats YES NSRunLoop runLoop NSRunLoop currentRunLoop runLoop addTimer timer forModes NSRunLoopCommonModes..

Problem in Background Thread in iPhone

http://stackoverflow.com/questions/7187967/problem-in-background-thread-in-iphone

pool NSAutoreleasePool alloc init NSTimer timer NSTimer timerWithTimeInterval 3 target self selector @selector triggerTimer userInfo nil repeats YES NSRunLoop runLoop NSRunLoop currentRunLoop runLoop addTimer timer forMode NSRunLoopCommonModes.. runLoop NSRunLoop currentRunLoop runLoop addTimer timer forMode NSRunLoopCommonModes runLoop run pool release void triggerTimer NSLog @ Timer Called after 3 seconds d count self.label.text NSString stringWithFormat @ count value d count self.titleLabel.text..