ios - [PhoneGap]preventing bounce ONLY in the main Window -
i using latest version of phonegap (3.4) , ios7.1 beta3, , find body (maybe call ui view element) have bad property of bounce pic below, , want disable it. tried search on website, , find only
<preference name="disallowoverscroll" value="false" />
works me, find preference make bounce disabled in elements in app, , want disable body`s bounce pic below, , keep bounce in div elements.
is there way solve issue out?
there way used achieve this. it's not conventional because it's dealing native coding. in mainviewcontroller there method named webviewdidfinishload. include this
thewebview.scrollview.bounces= no;
inside method.
- (void)webviewdidfinishload:(uiwebview*)thewebview { // black base color background matches native apps thewebview.backgroundcolor = [uicolor blackcolor]; thewebview.scrollview.bounces= no; return [super webviewdidfinishload:thewebview]; }
as ios native code, this'll work in phonegap/cordova distribution.
Comments
Post a Comment