Update:
my question is: how to prevent the scrollview being reset to the position when clicking on another textfield?
Actually I've tried several ways, such as the solution to this question.
Originally, my scrollView (multiple textfield and textview in it, and all of positions are placed in storyboard) is at the position (0, 302). When the keyboard appears, I wanna move it up to (0, 100). Firstly, I tried to add a button and do the following, it works.
CGRect frame = self.informationScrollView.frame;
frame.origin.y = 100;
self.informationScrollView.frame = frame;
Then I tried to do the same code in the selector of UIKeyboardDidShowNotification, but it failed. I found the position are always reset even when the activity textField has changed. Can anyone tell me how to prevent the app reseting the position? Thanks a lot.