vendredi 7 mars 2014

Slow UI update, add Spinner


Vote count:

0




I've created an iPad App which internally load a large amount of media, which can freeze the UI for a few seconds (especially on older iPads). I'm exploring async and adding a spinner, but it I haven't been able to identify the right spot for spinner to start prior to new ViewController opening. Any help is appreaciated.



- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {

[activityIndicatorObject startAnimating];

dispatch_queue_t downloadQueue = dispatch_queue_create("downloader", NULL);
dispatch_async(downloadQueue, ^{

understandingViewController *destViewController = segue.destinationViewController;
destViewController.itemNumber = num1;
destViewController.selectedItem = num1;

dispatch_async(dispatch_get_main_queue(), ^{
[activityIndicatorObject stopAnimating];
});

});


}



asked 25 secs ago






Aucun commentaire:

Enregistrer un commentaire