当传递给 @selector 的方法有参数时,需要语法帮助。谢谢!
//This works
dispatch_async(kBgQueue, ^{
[self performSelectorOnMainThread:@selector(hydrateList) withObject:nil waitUntilDone:YES];
});
//But what about when the method in the selector has arguments?
//This is incorrect, syntactically
dispatch_async(kBgQueue, ^{
[self performSelectorOnMainThread:@selector(hydrateListForCategory:self.categorySelected) withObject:nil waitUntilDone:YES];
});