iOS: Stop UIWebView Bounce, but keep scrolling enabled! ?

5,336 views
Skip to first unread message

Jared

unread,
Dec 21, 2011, 6:42:04 AM12/21/11
to phonegap
Is it possible, that PhoneGap implements an option to prevent the
UIWebView from bouncing, when the user scrolls to the very top or
bottom of the app, like mentioned here:

http://stackoverflow.com/questions/500761/stop-uiwebview-from-bouncing-vertically

Preventing touchemove via JS ist not an option, because it completely
disables scrolling of any content in the app.

The bouncing completely destroys the look and feel of an native app!

Phil Morley

unread,
Dec 23, 2011, 3:28:51 PM12/23/11
to phonegap
Here is what I did. Works like a charm.

https://twitter.com/rjfioravanti/statuses/127471754393305088

On Dec 21, 4:42 am, Jared <cmeix...@gmx.net> wrote:
> Is it possible, that PhoneGap implements an option to prevent the
> UIWebView from bouncing, when the user scrolls to the very top or
> bottom of the app, like mentioned here:
>
> http://stackoverflow.com/questions/500761/stop-uiwebview-from-bouncin...

Thierry

unread,
Jan 20, 2012, 9:26:30 AM1/20/12
to phonegap
add this line in - (void)webViewDidFinishLoad:(UIWebView *)theWebView

in AppDelegate


[[theWebView.subviews objectAtIndex:0] setBounces:NO];

Mary Nyamor

unread,
Jul 17, 2014, 9:02:48 AM7/17/14
to phon...@googlegroups.com
I had the same issue and got it working. You can have a look at my answer. stop-uiwebview-bounces-vertically-in-device.

jcesarmobile

unread,
Jul 18, 2014, 2:06:53 AM7/18/14
to phon...@googlegroups.com
Mary Nyamor, this is an old thread, this problem was solved long time ago, you just have to put this in your config.xml

<preference name="DisallowOverscroll" value="true"/>
Reply all
Reply to author
Forward
0 new messages