2012-05-15 142 views
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拍攝的圖像?

+0

你在哪裏運行這段代碼?在設備上? –

+0

是的,在設備..iphone 4 –

+0

幫助,有誰知道這是爲什麼發展? –

回答

1

我的第一個想法是降低質量參數爲25,事件雖然我認爲和iPhone 4有足夠的內存來處理50

此外,可以嘗試使用,而不是DATA_URL FILE_URI,看看它是否作品。

希望這會有幫助

相關問題