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

XBCurlView from bottom left instead of bottom right #15

Closed
travischoma opened this issue Mar 27, 2012 · 2 comments
Closed

XBCurlView from bottom left instead of bottom right #15

travischoma opened this issue Mar 27, 2012 · 2 comments

Comments

@travischoma
Copy link

In the readme you make reference to being able to set the direction of the curl, but I see the API has changed a little. If I wanted it to curl up from the bottom left what do you recommend that I change in terms of parameters in XBCurlView?

Thanks

@xissburg
Copy link
Owner

First you have to set the initial cylinder properties before starting the animation. In that case, set the cylinderPosition to the bottom right (this is the origin for rotations), cylinderAngle to 0, and radius to something like 30. Then set these properties with animation to something like: cylinderAngle -π/6 and cylinderRadius 60. You might also want to slide the position upwards. Something like this

curlView.cylinderPosition = CGPointMake(curlView.bounds.size.width, 0);
curlView.cylinderAngle = 0;
curlView.cylinderRadius = 30;
[curlView setCylinderPosition:CGPointMake(curlView.bounds.size.width, curlView.bounds.size.height/6) animatedWithDuration:0.3];
[curlView setCylinderAngle:-M_PI/6 animatedWithDuration:0.3];
[curlView setCylinderRadius:70 animatedWithDuration:0.3];

Hope this helps.

@travischoma
Copy link
Author

Thanks!

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