我这样做了
[(OfficeLinQViewController*)sharedManager.m_o performSelectorOnMainThread:@selector(findLocalListing::)
withObject:(folderList,path)
waitUntilDone:NO];Run Code Online (Sandbox Code Playgroud)
但问题是在findLocalListing函数中,两个参数路径都保存不了folderList.
再看一下这个withObject:部分.它表示withObject,而不是withObjects.您只能将一个参数传递给选择器.
我通常用这样的包装器方法解决这些问题.
[(OfficeLinQViewController*)sharedManager.m_o performSelectorOnMainThread:@selector(findLocalListingWithArgumentArray:)withObject:[NSArray arrayWithObjects:folderList,path, nil] waitUntilDone:NO];
- (void)findLocalListingWithArgumentArray:(NSArray *)argArray {
[self findLocalListing:[argArray objectAtIndex:0] inPath:[argArray objectAtIndex:1]];
}
Run Code Online (Sandbox Code Playgroud)
哦,你应该将findLocalListing ::重命名为有用的东西.
| 归档时间: |
|
| 查看次数: |
4513 次 |
| 最近记录: |