我已经打了一个电话给一个类的方法从的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