在我点击iOS

时间:2017-02-02 14:27:58

标签: jquery html ios

我必须解决一个iOS错误,当手机没有互联网连接时,图像会消失。

采取的步骤如下:

  1. 打开应用
  2. 转到其中一个选项(例如,以红色标注的选项)

  3. 返回到屏幕,图像消失了(只有文字忍受了)。

  4. 这很奇怪,因为当设备处于"监督之下时#34;野生动物园检查,它就像魔法一样。

    我在其他版本的应用程序中使用相同的代码,但这并没有发生。我对代码进行了比较,并没有任何区别!

    这是我的代码

        <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
    
        <meta http-equiv="Content-Security-Policy" content="default-src 'self' https: data: gap: https://ssl.gstatic.com * 'unsafe-eval'; style-src 'self' 'unsafe-inline' *; media-src *">
    
        <title>MobileBanking.Pac</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="format-detection" content="telephone=no">
    
        <link href="css/font.css" rel="stylesheet" />
        <link href="css/fontOverrides.css" rel="stylesheet" />
        <link rel="shortcut icon" href="">
    
        <link href="css/index.css" rel="stylesheet" />
        <link href="css/jquery.mobile-1.4.5.min.css" rel="stylesheet" />
    
        <link href="css/pickadate.js/default.css" rel="stylesheet" />
        <link href="css/pickadate.js/default.date.css" rel="stylesheet" />
        <link href="css/owl.carousel.min.css" rel="stylesheet" />
    
    </head>
    <body>
        <div data-role="page" id="index">
            <link href="css/Home/Home.css" rel="stylesheet" />
    
            <div class="background-blue background-blue-font" id="ActionButtonsIndex">
                <div data-role="header" class="ui-content-transparent">
                    <h1><img src="images/logo.png" width="170"></h1>
                </div>
                <a href="Views/Authentication/AuthenticationStep0.html" class="db p20b login-btn">
                    Ingresar a Movil
                    <img src="images/right207.png" width="13">
                </a>
                <div class="ui-grid-b">
                    <a href="Views/Selfadhesion/SelfadhesionStep1.html" class="ui-block-a bg-darker line-right">
                        <img src="images/icon_autoadhesion.png" width="33">
                        <p>Regístrate</p>
                    </a>
                    <a id="geolocation" class="ui-block-b bg-darker line-right" style="padding-left:0;padding-right:0;">
                        <img src="images/icon_sucursales.png" width="33">
                        <p>Agencias y Cajeros</p>
                    </a>
                    <a id="promo" class="ui-block-c bg-darker">
                        <img src="images/icon_promociones.png" width="33">
                        <p>Promociones</p>
                    </a>
                </div>
                <a href="Views/Home/HomeStep1.html" class="bg-darker line-top">
                    <img src="images/ic_call_white_48dp.png" width="20">
                    Contacto
                </a>
            </div>
            <div id="carousel" class="owl-carousel owl-loaded">
                <img src="images/inicio_banner_default2.jpg" style="width:100%;">
            </div>
            <a id="btnShare" href="#" class="background-blue p15v" data-role="footer" data-position="fixed">
                <img src="images/ic_thumb_up_white_48dp.png" width="20">
                Compartir
            </a>
        </div>
    
    
        <!-- Cordova reference, this is added to your app when it's built. -->
        <!--<script src="scripts/jquery-2.2.0.min.js"></script>-->
        <script src="scripts/jquery-2.1.1.min.js"></script>
        <script src="scripts/jquery.validate.min.js"></script>
        <script src="scripts/jquery.validate.addMethod.js"></script>
        <script src="scripts/jquery.mask.js"></script>
        <script src="scripts/Chart.min.js"></script>
    
        <script src="cordova.js"></script>
        <script src="scripts/platformOverrides.js"></script>
        <script src="scripts/index.js"></script>
        <script src="scripts/configuration.js"></script>
        <script src="scripts/Connection.js"></script>
        <script src="scripts/Context.js"></script>
        <script src="scripts/Resources.js"></script>
        <script src="scripts/ViewConector.js"></script>
        <script src="scripts/jquery.mobile-1.4.5.min.js"></script>
        <script src="scripts/jquery.dateFormat-1.0.js"></script>
        <!--<script src="scripts/imgcache.js"></script>-->
        <!--pickadate.js scripts-->
        <script src="scripts/pickadate.js/picker.js"></script>
        <script src="scripts/pickadate.js/picker.date.js"></script>
        <script src="scripts/pickadate.js/picker.time.js"></script>
        <script src="scripts/pickadate.js/es_ES.js"></script>
        <script src="scripts/xml2json.js"></script>
        <script src="scripts/Helpers.js"></script>
    
        <script src="scripts/jquery.inputmask.bundle.js"></script>
    
        <!--adding by CGV-->
        <script src="scripts/external/underscore.js"></script>
    
        <!--adding by JP-->
        <script src="scripts/owl.carousel.min.js"></script>
    
    </body>
    </html>
    

1 个答案:

答案 0 :(得分:0)

你将使用web + cache for image。

https://github.com/rs/SDWebImage/tree/master/SDWebImage

[imageView setImageWithURL:[NSURL URLWithString:profilePictureUrl] placeholderImage:[UIImage imageNamed:@“placeholder.png”]];