views:

153

answers:

1

I'm building an app that uses a UIView that contains a UIScrollView within it so that when the keyboard shows up, users can still scroll downwards to see the content within the view. It seems like I have gotten everything perfectly set up but when I rotate, everything goes completely unusable. The views are all out of place and I am unsure what's the strategy to handle this. I have the views autoresizing but they don't seem to be doing it correctly.

Should I manually check to see if the rotations have occurred and reset the frame without autoresizing or is there a way that I can accomplish this with auto resizing?

The situation is this: Portrait mode - form fits fine. When keyboard shows up, scroll view is resized but form does not.

Landscape mode - form doesn't fit fine and when keyboard shows up, scroll view is messed up.

Do I need to resize the form view when rotated to landscape mode?

Thanks!

A: 

You can reposition things back to original by using:

-(void)willAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {

//reposition code

}

I have an issue where I want the keyboard to resign upon the ipad rotating. If the keyboard is open in portrait, and I rotate to landscape, the keyboard appears in landscape.

HOW DO I RESIGN the keyboard when I rotate!

TY

Chris Allinson