[self.scrollView scrollRectToVisible:rect animated:YES]
Does anyone know why this works fine on iOS6.1, and on iOS7.0.4 it always scrolls to the UITextField, which became the first Responder, no matter what type I send as an argument?
CGRect rect = CGRectMake(0, self.scrollView.frame.size.height - 1, 320, 1); [self.scrollView scrollRectToVisible:rect animated:YES];
This code will scroll the UIScrollView to the lowest level, when the keyboard is displayed due to the UITextField inside the UIScrollView, it became the first responder on iOS6.1, but on iOS7.0.4 it scrolls so that UITextFiled is displayed instead.
As I understand it, UIScrollView in the iOS7 SDK no matter what, autoscrolls everything that became the first responder inside it when scrollRectToVisible: is called: animated :.
ios objective-c iphone ios7 uiscrollview
Henrik lineholm
source share