When the screen is rotated, both the scroll view and form view need to be resized. Then the
contentSize property needs to be updated.
You already have code to resize the scroll view. Put breakpoints in
keyboardwillHide: and run the app again. Rotate the screen and you see that each method is called. The system hides and shows the keyboard to set it to the correct size. Those methods also correctly set the size of the scroll area.
The form view is also resized when the screen rotates. This happens when the scroll view changes size and updates the layout for its children. All you need to do is update
contentSize from the new form view frame. Add the following line of code at the end of both the