1-gcdblockblock
Dispatch_async (Dispatch_get_main_queue (), ^{
});
2-nsoperation
Nsoperationqueue *mainqueue = [Nsoperationqueue
Mainqueue];
Nsblockoperation *operation = [nsblockoperation
blockoperationwithblock:^{
}];
[Mainqueue addoperation:operation];
3-nsthread
[Selfperformselector: @selector (method)
Onthread:[nsthread Mainthread] WithObject:nilwaitUntilDone:YESmodes:nil];
[Selfperformselectoronmainthread: @selector (method)
WithObject:nilwaitUntilDone:YES];
[[Nsthread Mainthread] Performselector:
@selector (method) Withobject:nil];
4-runloop
[Selfperformselectoronmainthread: @selector (method)
WithObject:nilwaitUntilDone:YES];
[[Nsthread Mainthread] Performselector:
@selector (method) Withobject:nil];
? Runloop
[[Nsrunloop Mainrunloop] Performselector: @selector (method) Withobject:nil];
4 method that takes a number of rows in the main thread