Titanium – Vertical CoverFlows

Tags

Titanium – Vertical CoverFlows

Coverflows are great, but what if you want to do a vertical coverflow? So you can flip up & down between images, or options, etc…

This is insanely easy in Titanium –

// Build your Cover Flow as usual... 

var images = ['option1.png','option2.png','option3.png','option4.png'];

var view = Titanium.UI.createCoverFlowView({
    images:images,
    right:400,
    left:0,
    top:70,
    height:678 // Remember - we're going to rorate 90 degrees, so this is actually width...
});

// Apply the transform.  90 to rotate Clockwise, -90 to rotate counter clockwise.
view.transform = Ti.UI.create2DMatrix().rotate(-90);

// Don't forget to add to the view...
win1.add(view);

And you’re all set.

Leave a Reply

You must be logged in to post a comment.

Copyright © 2012 Ken Bantoft. Icons by Wefunction. Designed by Woo Themes