- (id)performSelector:(SEL)aSelector;
- (id)performSelector:(SEL)aSelector withObject:(id)object;
- (id)performSelector:(SEL)aSelector withObject:(id)object1 withObject:(id)object2;
- (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay;
- (void)performSelector:(SEL)aSelector onThread:(NSThread *)thr withObject:(id)arg waitUntilDone:(BOOL)wait;
- (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait;
//performSelector
[NSObject performSelector:@selector(dosomething) withObject:nil afterDelay:0.5];
//GCD
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self dosomething];
});
//performSelector
[NSObject performSelectorOnMainThread:@selector(dosomething) withObject:nil waitUntilDone:NO];
//GCD
dispatch_async(dispatch_get_main_queue(), ^{
[self dosomething];
});