How to add title of image to coverflow view
I see Coverflow View in iPhone is same as this: http://flic.kr/p/8JYtsU
It has an image, plus a label in the bottom of each image.
But Coverflow View of Titanium is like that: http://flic.kr/p/8JYun3
As you see, it only has image, not has label.
How can we add label to image in Coverflow View? Can anyone help me?
Thanks so much.
3 Answers
-
CoverFlow doesn't have any labels, it's purpose is to display images.
Just add your own label at the bottom.
-
you can try to create view, add image and label too it and then use view.toImage(); to create image for coverflow.
-
Try this
var win = Ti.UI.currentWindow; // array of titles of the every image var title = []; // array of images for the cover flow var imagesUrls =[]; var Images = Titanium.UI.createCoverFlowView({ images: imagesUrls, top: 0, }); var Titles = Titanium.UI.createLabel({ text:titles[0], top:180, textAlign:'center', font: { fontsize:50 }, color:'#ffffff' }); win.add(Titles); Images.addEventListener('change', function(e) { Titles.text=titles[e.index] }); win.add(videosImages);