Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/44.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ios/cordova 2.2.0:应用程序在拍摄多张照片时崩溃_Cordova - Fatal编程技术网

ios/cordova 2.2.0:应用程序在拍摄多张照片时崩溃

ios/cordova 2.2.0:应用程序在拍摄多张照片时崩溃,cordova,Cordova,调用get picture方法时,我们的应用程序在拍照时随机崩溃 我们确实有一个背景URL,指向我们在其上单击以启动相机的元素 但我们无法删除此URL。尝试了所有选项,但没有任何效果,应用程序仍然崩溃,请帮助 our app crashes randomly while taking photos when the method get picture is called. We do have background URL to the element on whose click we l

调用get picture方法时,我们的应用程序在拍照时随机崩溃

我们确实有一个背景URL,指向我们在其上单击以启动相机的元素

但我们无法删除此URL。尝试了所有选项,但没有任何效果,应用程序仍然崩溃,请帮助

our app crashes randomly while taking photos when the method get picture is called.

We do have background URL to the element on whose click we launch the camera...

But we cannot remove this URL. tried all the options but nothing works app still crashes please help.

HTML markup:

<div class="ui-grid-a"> <img class = "ui-block-a ui-bar-a new-photo-class accident-photos-block accident-photos-block-margin-right accident-photos-img owner-information-photos-class" id="ownerInformation_photo1" data-photoname = "photo1" /> <img class = "ui-block-b ui-bar-a new-photo-class accident-photos-block accident-photos-block-margin-left accident-photos-img owner-information-photos-class" id="ownerInformation_photo2" data-photoname = "photo2"/> </div>

下面是另一个例子:

您可以发布您的代码片段吗?在我的代码中,有一个带有图像的框,单击该框,我将捕获图像并替换拍摄的图像。当启动相机的控件上有一个带有背景图像的css时,就会出现问题,在我的例子中是这个框,如果我删除了类new photo类,那么所有这些都可以在iOS中正常工作。
class: 

.new-photo-class{
    background-repeat:no-repeat;
    background-position: center; 
    background-image: url('images/hdpi/new_photo.png'); 
    background-image: url('images/hdpi/new_photo.png'), -webkit-gradient(linear, left top, left bottom, from(#636363), to(#3f3f3f)); /* Saf4+, Chrome */
    background-image: url('images/hdpi/new_photo.png'), -webkit-linear-gradient(top, #636363, #3f3f3f); /* Chrome 10+, Saf5.1+ */
    background-image: url('images/hdpi/new_photo.png'),    -moz-linear-gradient(top, #636363, #3f3f3f); /* FF3.6+ */
    background-image: url('images/hdpi/new_photo.png'),     -ms-linear-gradient(top, #636363, #3f3f3f); /* IE10 */
    background-image: url('images/hdpi/new_photo.png'),      -o-linear-gradient(top, #636363, #3f3f3f); /* Opera 11.10+ */
    background-image: url('images/hdpi/new_photo.png'),         linear-gradient(top, #636363, #3f3f3f);

}

.new-photo-class:hover{
    background-repeat:no-repeat;
    background-position: center; 
    background-image: url('images/hdpi/new_photo.png'); 
    background-image: url('images/hdpi/new_photo.png'), -webkit-gradient(linear, left top, left bottom, from( #ffae00 /*{d-bdown-background-start}*/), to( #febe10 /*{d-bdown-background-end}*/)) !important; /* Saf4 , Chrome */
    background-image: url('images/hdpi/new_photo.png'), -webkit-linear-gradient( #ffae00 /*{d-bdown-background-start}*/, #febe10 /*{d-bdown-background-end}*/) !important; /* Chrome 10 , Saf5.1  */
    background-image: url('images/hdpi/new_photo.png'),   -moz-linear-gradient( #ffae00 /*{d-bdown-background-start}*/, #febe10 /*{d-bdown-background-end}*/) !important; /* FF3.6 */
    background-image: url('images/hdpi/new_photo.png'),    -ms-linear-gradient( #ffae00 /*{d-bdown-background-start}*/, #febe10 /*{d-bdown-background-end}*/) !important; /* IE10 */
    background-image: url('images/hdpi/new_photo.png'),     -o-linear-gradient( #ffae00 /*{d-bdown-background-start}*/, #febe10 /*{d-bdown-background-end}*/) !important; /* Opera 11.10  */
    background-image: url('images/hdpi/new_photo.png'),        linear-gradient( #ffae00 /*{d-bdown-background-start}*/, #febe10 /*{d-bdown-background-end}*/)!important;
}
and the click of the photo image:
 // click function of photo 
    $(".owner-information-photos-class").off('click').on('click', function(){
        var photoNumber = $(this).data(Constants.photo_name);
        var photoId = $(this).attr(Constants.id);
        var src = $(this).attr(Constants.src);
        if(src === Config.add_image_url){
            DeviceManager.capturePhoto(photoNumber, photoId, Constants.owner_information_directory_key, false);
        } else {

            photoNameOwnerInfo = photoNumber;
            // set the source path of the image to the global variable
            largeImageSrc = src;
            // make a change page with the larger image shown 
            $.mobile.changePage( "#pageAccidentPhotosLargeImage");
        }
    });

------------------------------------------------------------------------