Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

How to use allowEditing in openPhotoGallery, showCamera?

Here is the piece of sample code from kitchen sink photo_gallery.js

When i change allowEditing properties in openPhotoGallery from true to false, the imageView can't get the image shown.

This issue also appear in function Titanium.Media.openCamera.
I am in iOS4, SDK 1.4. Any suggest is welcome. Thx.

Titanium.Media.openPhotoGallery({

    success:function(event)
    {
        var cropRect = event.cropRect;
        var image = event.media;

        // set image view
        Ti.API.debug('Our type was: '+event.mediaType);
        if(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO)
        {
            imageView.image = image;
        }
        else
        {

        }

        Titanium.API.info('PHOTO GALLERY SUCCESS cropRect.x ' + cropRect.x + ' cropRect.y ' + cropRect.y  + ' cropRect.height ' + cropRect.height + ' cropRect.width ' + cropRect.width);

    },
    cancel:function()
    {

    },
    error:function(error)
    {
    },
    allowEditing:false,
    popoverView:popoverView,
    arrowDirection:arrowDirection,
    mediaTypes:[Ti.Media.MEDIA_TYPE_VIDEO,Ti.Media.MEDIA_TYPE_PHOTO],
});
— asked August 21st 2010 by Sam Wong
  • ios4
  • openphotogallery
  • showcamera
1 Comment
  • Same here. With allowEditing:false the image is not found and the camera crashes.

    — commented September 22nd 2010 by matt raj

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.