difference among NSthread and NStimer and NSNotifcation?
- by senthilmuthu
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];