difference among NSthread and NStimer and NSNotifcation?

Posted by senthilmuthu on Stack Overflow See other posts from Stack Overflow or by senthilmuthu
Published on 2010-03-24T07:18:03Z Indexed on 2010/03/24 7:23 UTC
Read the original article Hit count: 226

Filed under:
|

What is the difference among following codes

1)

 [NSThread detachNewThreadSelector:@selector(myFunction) toTarget:self withObject:thename];

2)

[NSTimer scheduledTimerWithTimeInterval:1.0
                                 target:self 
                               selector:@selector(myFunction:) 
                               userInfo:nil 
                                repeats:NO];

3)

[self performSelector:@selector(myFunction) withObject:nil afterDelay:myDelay]; 

4)

 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myFunction:) name:thename object:nil];

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk