Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 9
    But it also moves up the view when textField is already visible. Commented May 5, 2014 at 7:03
  • 1
    Need to change CGPointMake(0, textField.frame.origin.y); to CGPointMake(0, textField.frame.origin.y + scrollView.contentInset.top); Commented Jan 11, 2015 at 14:24
  • @Egor Even after your comment it doesn't work. Like "TheTiger" mentioned it moves up the view even after textfield is visible. Commented Apr 3, 2017 at 18:32
  • Change for XCode 10: "Select All TextFields => Editor => Embed In => Scroll View" Commented May 7, 2019 at 16:57