iOS 5 OpenFlow tweaks

Nov 23, 11 • Mobile, sereneNo CommentsRead More »

Openflow is an open source library that implements an iTunes style cover flow. [http://apparentlogic.com/openflow/]

When iOS5 was released, though, it started looking funny – the covers were coming in from the front instead of the back. The perspective was completely off.

This can be fixed with a few tweaks outlined at http://stackoverflow.com/questions/7686506/how-can-i-make-openflow-work-correctly-in-ios-5-0

Specifically the following

    leftTransform = CATransform3DIdentity;
    leftTransform = CATransform3DRotate(leftTransform, SIDE_COVER_ANGLE, 0.0f, 1.0f, 0.0f);
    rightTransform = CATransform3DIdentity;
    rightTransform = CATransform3DRotate(rightTransform, SIDE_COVER_ANGLE, 0.0f, -1.0f, 0.0f);
Turns into
    leftTransform = CATransform3DTranslate(CATransform3DIdentity, 0, 0, SIDE_COVER_ZPOSITION);
    leftTransform = CATransform3DRotate(leftTransform, SIDE_COVER_ANGLE, 0.0f, 1.0f, 0.0f);
    rightTransform = CATransform3DTranslate(CATransform3DIdentity, 0, 0, SIDE_COVER_ZPOSITION);
    rightTransform = CATransform3DRotate(rightTransform, SIDE_COVER_ANGLE, 0.0f, -1.0f, 0.0f);
in AFOpenFlowView.m

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>