Như Tôi khá mới để ObjC tôi bị mắc kẹt đến vấn đề sau:Objective-C sử dụng chủ đề gây ra: mục tiêu không thực hiện selector
Tôi có một chức năng downloadFile
-(void) downloadFile:(NSMutableArray*)paramArray withDict:(NSMutableDictionary*)options
{
//do stuff
}
Tôi muốn bắt đầu này như một chủ đề, và do đó tôi sử dụng dòng mã này:
NSThread* dLoad = [[NSThread alloc] initWithTarget:self selector:@selector(downloadFile:) object:nil];
[dLoad start];
Nó ném cho tôi những lỗi sau:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSThread initWithTarget:selector:object:]: target does not implement selector (*** -[LaunchDownload downloadFile:])'
Tôi đang thiếu gì ở đây?