0
Я пытаюсь отобразить представление, потому что метод занимает несколько секунд. Тем не менее, загрузка UIWindow фактически не становится ключевым и видимым до тех пор, пока весь метод не будет завершен. Любая идея, что здесь происходит?UIWindow не отображается, пока метод не завершится
// this line creates a uiwindow with view controller as root view controller, an activity indicator, and a label and makes the loading view key and visible
[XSELLoadingView presentLoadingViewWithTitle:@"Generating Report"]; // use loading view for long times
// these three lines process a lot of data and present the view on the main window
XSELCount *startCount = [[XSELCount counts] objectAtIndex:[self.startingPick selectedRowInComponent:0]];
XSELCount *endCount = [[XSELCount counts] objectAtIndex:[self.endingPick selectedRowInComponent:0
[self.navigationController pushViewController:[XSELReportView viewWithReportData:[XSELReportData compareStartCount:startCount toEndCount:endCount]] animated:false];
// this line makes the main view key and visable
[XSELLoadingView dismissLoadingView];
Для уточнения XSELLoadingView представляет собой окно с представлением, а не только представление поверх текущего окна. – Scott
Вам нужно выполнить длительную обработку в фоновом режиме. – rmaddy