Take multiple pictures using Titanium/Appcelerator on iPhone
I am working on a small iPhone app using Titanium/Appcelerator. Now what I am trying to do is the following:
- Open the camera to take a picture
- Ask the user if he wants to add another picture (OptionDialog)
- Open the camera again
- {loop here}
- Put the images (saved l开发者_如何学运维ocally) into an array
I tried putting a OptionDialog into the success event of the camera, but it didn't work as expected.
maybe something like that.
dialog.addEventListener('click',function(e){
switch (e.index){
case 1:
takeAPicture();
case default:
...
};
});
function takeAPicture(){
Titanium.Media.showCamera({
success: function(evtSuccess) {
dialog.show();
},
...
});
};
Titanium.Media.takePicture();
what happened putting it into the success event? what exactly did you put into? i would put the
dialog.show();
into the success event too
精彩评论