TTPhotoViewController thumbnails rotate but images don't

976 views Asked by At

I have PhotoTest1Controller very similiar to the one in Three20 samples. I implemented necessary shouldRotate methods in necessary places in UITabBarController and UINavController derived classes as well as the table that contains PhotoTest1Controller.

A funny thing is happening, when in thumbnail mode, the view rotates properly, but when showing a picture it does not respond to rotation. Moreover, If I rotate in thumbnail view and then switch to single image view in that rotation, I find that the image is properly rotated in the background. It only ignores rotation when it is the topmost view!

So, my understanding is that shouldRotate events are properly propagated, but for some reason single image view does not rotate when in top view, unlike the example code which is %98 equal to my code...

1

There are 1 answers

0
mentat On BEST ANSWER

I found the answer to my own problem and answered it here: TTThumbView/TTPhotoView no autorotation

Briefly: I don't know why but TTScrollView deviceOrientationDidChange method in three20 codebase is commented out! If you uncomment it, it will work.

See the code here: http://github.com/facebook/three20/blob/master/src/TTScrollView.m