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)如何顯示在View
拍攝的圖像?
你在哪裏運行這段代碼?在設備上? –
是的,在設備..iphone 4 –
幫助,有誰知道這是爲什麼發展? –