[PhoneGap]preventing bounce ONLY in the main Window

前端 未结 2 1872
走了就别回头了
走了就别回头了 2021-02-02 01:04

I am now using the latest version of PhoneGap (3.4) and iOS7.1 beta3, and i find the body (maybe call UI View element) have a bad property of bounce just like the pic below, and

2条回答
  •  故里飘歌
    2021-02-02 01:40

    You need both of these preferences in your config.xml file:

    
    
    

    You can then enable iOS-native-style scrolling on nested containers with:

    .scrollingArea
    {
      width: 100%;
      height: (some-fixed-height);
      overflow: hidden;
      overflow-y: scroll !important;
      -webkit-overflow-scrolling: touch;
    }
    

    You may also find it useful to capture and block the touchmove' event on certain elements that you don't wish to be user-scrollable (depending on your layout).

提交回复
热议问题