Нужна помощь в синтаксисе, когда метод, передаваемый в @selector, имеет аргументы. Благодаря!Objective-C Передача сообщений с аргументами в performSelectorOnMainThread:
//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];
});
Поиск этого метода и прочитать документацию. [Документация NSObject] (https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/nsobject_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/performSelectorOnMainThread:withObject : waitUntilDone :) – MechEthan