Попытка использовать NSThread::detachNewThreadSelector
с анонимной функцией
void (^testA)(void) = ^
{
NSAutoreleasePool *oPool = [[NSAutoreleasePool alloc] init];
NSLog(@"in threadA",nil);
[oPool release];
};
[NSThread detachNewThreadSelector:@selector(testA) toTarget:testA withObject:nil];
когда я пытаюсь запустить приложение, я получаю сообщение об ошибке:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSThread initWithTarget:selector:object:]: target does not implement selector (*** -[__NSGlobalBlock__ testA])'
Кто-нибудь может мне помочь с этим?