objective c - App stops receiving data from socket when UI scroll -


i have ipad app receives data using udp sockets. , has uiwebview browse webpages. while doing scroll in uiwebview, freezes , no data received. i've been searching , has runloops , threads. if uiwebview can't run in thread other main one, how can receive data while doing scroll? critical keep receiving data.

the project uses asyncudpsocket class cocoa asyncsocket works quite well. , singleton class matt gallagher. running in main thread, udp reception , ui.

thanks in advance!

when scroll, runloop enters different mode (uitrackingrunloopmode) , stops responding network activity on main thread. done performance reasons.

you should able schedule updates on proper runloop mode (uitrackingrunloopmode believe). though, wouldn't recommend this.

instead, try setting udp networking code on thread (or queue, yay gcd!) , schedule callbacks on main thread update ui. guarantee networking thread has proper runloop mode when getting data on socket.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -