Why do the pages blink/flicker after transitions in my jQuery Mobile PhoneGap app on iOS?

前端 未结 4 1326
走了就别回头了
走了就别回头了 2020-12-11 05:16

I have a jQuery Mobile app that I\'ve converted to an iOS app using PhoneGap. I\'m using version 1.1.0 of jQM.

I\'m using \"fade\" transitions between pages (as I re

相关标签:
4条回答
  • 2020-12-11 05:37

    Fade transition blinks mostly you should change it to slide or some other transition mode.

    0 讨论(0)
  • 2020-12-11 05:59

    That might help

    <meta name="viewport" content="width=device-width, user-scalable=no" />
    
    0 讨论(0)
  • 2020-12-11 06:00

    This guy solved the problem - it worked for me:

    http://outof.me/fixing-flickers-jumps-of-jquery-mobile-transitions-in-phonegap-apps/

    CSS:

    body {
        /* Setting body margins to 0 to have proper positioning of #container div */
        margin: 0;
    }
    
    /* #container div with absolute position and 100% width and height so it takes up whole window */
    #container {
        position: absolute;
        width: 100%;
        height: 100%;
    }
    

    JS:

    $(document).one("mobileinit", function () {
    
        // Setting #container div as a jqm pageContainer
        $.mobile.pageContainer = $('#container');
    
        // Setting default page transition to slide
        $.mobile.defaultPageTransition = 'slide';
    
    });
    

    And wrap all your jQM pages in a single <div id="container">

    0 讨论(0)
  • 2020-12-11 06:01

    use following code

    $(document).ready(function() 
    { 
    
        $.mobile.defaultPageTransition = "none"
        $.mobile.defaultDialogTransition = 'none';
        $.mobile.useFastClick = true; 
        $.mobile.touchOverflowEnabled = true;
    
    });
    
    0 讨论(0)
提交回复
热议问题