开发者

TTPhotoViewController thumbnails rotate but images don't

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 tabl开发者_如何学Ce 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...


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜