I\'ve been trying to make this work for days now, with no luck, so I thought I\'d share info and maybe someone comes up with a solution.
I want to get the exact viewport
Just to give you an idea, when the keyboard appears on iOS by default it does nothing on the underlying scrollview.
If your content is shown in a custom UIWebView
, it is up to the programmer to either:
Resize the scrollview to avoid getting unreachable content under the keyboard.
Adjust the scrollview's content insets (recommended). The scrollview size stays the same but a "border" is added to the bottom so the user can scroll all to all the contents.
I am not sure how either solution affects the viewport
, but your could try both.
If your web content is being presented by Safari however, Apple adjusts the insets for you.