我已在我的项目中编写代码
[NSInvocationOperation alloc]
initWithTarget:self
selector:@selector(loadImage)
object:ob
方法中的
- (void)loadImage {
}
答案 0 :(得分:1)
这可能会有所帮助;
// Your NSInvocationOperation definition
[NSInvocationOperation alloc] initWithTarget:self selector:@selector(loadImage:) object:ob];
// Add an argument, this one is called 'sender'
- (void)loadImage:(id)sender { // 'sender' equals your object 'ob' from above
// Do whatever you want to
}
有关NSInvocationOperation的更多参考/信息: NSInvocationOperation Class Reference