我已經打了一個電話給一個類的方法從的appDelegate像這樣:從方法中調用方法取消了主線程
RankingAndSMProcess *process = [RankingAndSMProcess alloc];
[process performSelectorInBackground:@selector(DoRankingAndSocialMediaProcessing) withObject:nil];
[process release];
此方法調用其他方法:
@try {
[self GoForRankingProcess];
[self updateItemsForPeerindex];
[self updateItemsForKloat];
[self updateItemsForKred];
}
@catch (NSException *exception) {
NSLog(@"An Error has been occured:%@", exception);
}
@finally {
[items release];
[profile release];
}
是否所有在RankingAndSMProcess中的DoRankingAndSocialMediaProcessing方法中調用的方法必須以與後臺線程上的DoRankingAndSocialMediaProcessing相同的方式調用?或者在這裏還有另一個潛在的問題?
目前我不認爲任何處理方法正在被解僱,因爲沒有收集到新的數據。
在添加更改調用以在後臺執行之前,所有方法和整個過程按預期工作。
你好,很高興這可以幫助你。如果你滿意,你可以請同樣的投票。 :) – Mrunal 2012-07-26 14:10:30