Question

My view scans a barcode then segues to another view where it loads info from a website about the barcode. My problem is that after scanning the the screen freezes instead of immediately segueing to the new view where it would show a loading indicator until the data loaded. The segue only happens AFTER all the information has loaded or has failed to load etc. How can I get this transition to happen?

Was it helpful?

Solution

You are trying to do this processing on the main thread, I'd bet. Read up on Grand Central Dispatch so you can offload this work onto a background thread, leaving your UI responsive.

(If you post code we can be more specific...)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top