我想使用多个参数创建一个线程。 这可能吗? 我具备的功能:在NSThread问题上使用两个参数调用选择器
-(void) loginWithUser:(NSString *) user password:(NSString *) password { }
而且我要调用此功能选择:
[NSThread detachNewThreadSelector:@selector(loginWithUser:user:password:) toTarget:self withObject:@"someusername" withObject:@"somepassword"]; // this is wrong
如何通过这个detachNewThreadSelect功能上withObject参数两种说法?
可能吗?
感谢伟大的回答这个问题@Lance。 – iPadDeveloper2011 2013-05-23 07:15:24
您在第一行的末尾忘了分号;-) – Ken 2018-02-04 13:08:37