tags:

views:

230

answers:

2

iPhone app stop rotating after few touches or sometimes stop rotating at all, other times works just fine. Any idea where to look for the problem?

My app is designed to support auto-rotate and works fine previously until I added some code that move JSOn data loading to another thread.

+1  A: 

Are you trying to do the rotation through the other thread? If this is the case then the you must make those calls on the main thread. UIKit is not thread safe, anything not done on the main thread is not guaranteed. What you must do is call performSelectorOnMainTHread NSObject method in order to get the behavior that you are expecting

Daniel
Did double check and make sure any thread process call on performOnMainThread if it's related to UI updates -- didn't help. Worse the problem is inconsistent.
Seymour Cakes
Post some sample code , might be able to help better if u do
Daniel
+1  A: 

are you calling

[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];

anywhere in your code? if not, I agree with the previous answer that you must just be confusing UIKit somehow.

David Maymudes
No, my app doesn't call this but it sure looks like something stopped the rotating notification as put logs for rotation stop working when it stop rotating. It's as if the device doesn't detect anymore rotation.
Seymour Cakes