Domanda

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?

È stato utile?

Soluzione

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...)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top