Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keyboard slideout causes UIWebView to shift left

My app is powered by a full screen UIWebView. It works well except when the keyboard is brought up the view is shifted over about 10 pixels leaving a white gap (see screenshot below).

Does anyone know what causes this and if there are any solutions or work arounds?

UPDATE: To be more specific, the UIWebView is not shifting over, the HTML content is shifting over.

enter image description here

like image 846
joe Avatar asked Jan 08 '13 19:01

joe


1 Answers

You can try disabling zoom for webview:

webview.scrollView.delegate = self;

-(UIView*)viewForZoomingInScrollView:(UIScrollView*)scrollView {
return nil;
}
like image 77
Deniz Mert Edincik Avatar answered Oct 21 '22 17:10

Deniz Mert Edincik