var self = Ti.UI.createView();
var lblId = Ti.UI.createLabel({
text : 'No valid files were identified.',
left : 8,
right : 8,
top : 32,
});
self.add(lblId);
var imgFile=Ti.UI.createImageView({
left:8,
right:8,
top:80,
height:200,
});
self.add(imgFile);
var tmrCheck = setInterval(function() {
//now copy more than one image from iOS Photos (like attachment) and see the result
//notice that Blob size and image refers to only one image
if (Ti.UI.Clipboard.hasData('image')) {
imgFile.image=Ti.UI.Clipboard.getData('image');
Ti.API.info(Ti.UI.Clipboard.getData('image').getSize());
lblId.text = 'Media Identified!';
}else{
lblId.text ='No valid files were identified.';
}
}, 3000);
The following Obj-C code gives the total number of items currently present in the clipboard:
+10