0
我想知道和了解這段代碼幫助我瞭解此代碼段
NSOperationQueue *queue = [NSOperationQueue new];
NSInvocationOperation *operation = [[NSInvocationOperation alloc]
initWithTarget:self
selector:@selector(navigatePage)
object:nil];
[queue addOperation:operation];
[operation release];
[queue release];
-(void)navigatePage
//==================
{
[self performSelectorOnMainThread:@selector(loadPageDetails) withObject:nil waitUntilDone:NO];
[myTableView performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:NO];
}
感謝您的時間。
我想查看NSOperationQueue和NSInvocationOperation的API頁面,他們應該告訴你你需要知道什麼。上面的代碼有什麼不明白的地方嗎?哪一點? – occulus 2011-04-06 10:27:26