我的应用程序有点问题。
当我切换视图时,在这个应用程序运行两个排序算法之后,会有大约 3 到 10 秒的时间延迟。(快速和冒泡排序)在一个额外的线程中。我不知道问题出在哪里。
这里的代码片段:
[alert show];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, (unsigned long)NULL), ^(void) {
time = [Sort sortRuns:(int)slider_durchlaeufe.value WithCapacity:(int)slider_ArraySize.value Reference:alert]; //time is a global reference to my Time object
[self setDataForStatistik]; // a Method to set the statisik for the next view
[alert dismissWithClickedButtonIndex:0 animated:true];
});
我认为失败出在这段代码片段中。
我希望你能帮助我。
罗比字节