Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Layers on demand to handle transparent PNGs #12

Open
florianpilz opened this issue May 2, 2012 · 1 comment
Open

Create Layers on demand to handle transparent PNGs #12

florianpilz opened this issue May 2, 2012 · 1 comment

Comments

@florianpilz
Copy link

Hi, we're using iOS-Flip-Transform for a digital clock. Your framework is great, but it has one major drawback: Transparency. We used transparent pictures for each digit with a rounded corner (using transparency). Due to the transparency, all layers of the FlipView are rendered (since all are visible through the transparent corners - even though there is just another transparent corner beneath), i.e. 410 layers in our case. As you can imagine, drawing the clock the first time is slow and visible to the user.

Our solution will be to use non-transparent pictures and give up on rounded corners. The proper solution, which is currently not supported by the framework, would be to create the layers on demand, i.e. only create & draw the frontmost digit with its 10 layers and don't rely on the visible surface determination of Core Animation to prevent drawing of layers beneath the frontmost one.

@Dillion
Copy link
Owner

Dillion commented Jul 13, 2012

Indeed the current version needs to be better structured. Ideally only 3 animation frames (the view currently shown, the next one and the previous) need to be created and rendered at anytime, and all the layer info stored in a collection with methods for insertion, deletion and reordering. Pull requests welcome! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants