tags:

views:

27

answers:

1

as topic, I try to build the effect, but face a problem,

I use UIScrollView and PageController, it works on landscape, but not Portrait, if the app starting 'Portrait' mode and then when I rotate the device, the view do not fit to screen, I think that the UIScrollView content size need to redefined, then I assign the 'height' to 'width' of the content , and 'width' to 'height' of the content, but it does not properly ,

maybe we can find some exist open source code for this feature ? I believe this feature 'SpringBorad' effect is very commonly ....

thanks for tip .

All best .

A: 

What are you doing in the shouldAutoRotateToInterfaceOrientation for the View? You need to make sure this returns YES for all orientations you want to support.

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return YES;
}
MystikSpiral
it set... the problem is confuse, if the device init Orientation is landscape then it no problem: whatever I rotate the device, the scrollview contained page view will show suit size, but if the init Orientation is Portrait, then when I rotate device to landscape, the scrollview content size seem is not right, I do not why, so I guess that I need redefined the content size....
robin
Check out this thread. I had a similar problem on the iPad. http://stackoverflow.com/questions/2686977/how-can-i-set-the-inital-orientation-for-a-uisplitviewcontroller-based-ipad-app
MystikSpiral