ioscore-plotuiinterfaceorientation

failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode void SendDelegateMessage(NSInvocation*): delegate


I'm developing an iOS app using Core Plot headers. I have different UI for landscape and portrait. On orientation change, I'm getting this failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode void SendDelegateMessage(NSInvocation*): delegate when I try to modify the frames of an UIView. Can some one please suggest me what to do.


Solution

  • A couple of suggestions for debugging this problem, first try to figure out what part of your drawing is taking so long. Try using the Time Profiler instrument in instruments, Hold option to select parts of the graph where your program is bogging down, and examine the call tree. Try Selectively placed NSLog statements, try pausing in the debugger. Figure what part of your operation is taking to long. Try and break the task up into pieces, see if you can cache elements of your UI from one orientation and reuse them in the other.
    Try doing your rendering in the background using NSOpperationQueue. Check out Apples Concurrency programming guide.