1

1.) 我的应用程序因以下错误消息而崩溃;

Multi-tasking -> Device: YES, App: YES
2012-05-15 22:14:04.401 ProOne[1720:607] Received memory warning. Level=1
2012-05-15 22:14:08.556 ProOne[1720:607] -[__NSArrayM pickerController]: unrecognized selector sent to instance 0x1e7e90
2012-05-15 22:14:08.758 ProOne[1720:607] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM pickerController]: unrecognized selector sent to instance 0x1e7e90'

这是代码

onImageClick: function () {
           navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
                                       destinationType: Camera.DestinationType.DATA_URL,
                                       sourceType : Camera.PictureSourceType.CAMERA, 
                                       allowEdit : false, 
                                       encodingType: Camera.EncodingType.JPEG, 
                                       targetWidth: 500, 
                                       targetHeight: 500 
                                       }); 

           function onSuccess(imageData) {
           var image = Ext.getCmp('myImageId');
           image.setSrc("data:image/jpeg;base64," + imageData);
           }

           function onFail(message) {
           alert('Failed because: ' + message);

           }
           }

2.) 我如何显示在 a 中拍摄的图像View

4

1 回答 1

1

My first idea would be to lower the quality parameters to 25, event though I think and iPhone 4 has enough memory to handle 50.

Also, could you try to use FILE_URI instead of DATA_URL and see if it works.

Hope this helps

于 2012-05-20T08:08:48.900 回答