-
Notifications
You must be signed in to change notification settings - Fork 135
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
Curl from left to right #12
Comments
You have to set the initial cylinder properties before adding the XBCurlView in your view hierarchy. Then, you just have to animate them. To do a flip to the previous page, you can set the cylinder position to (0,0), angle π/2 and radius 0. Then animate it to the other side of the screen, for instance set the cylinder position to (width,0) and angle π/4. For the radius, you could increase it till half the animation duration and then decrease it, like set it to 80 in the middle of the animation and then set it to 20 to the end (use a completion block). Hope this helps. |
Hmm, no that is not what I meant to say. You are correct, with your example values the curling takes place from left to right - but it actually simply "uncurls" the curling of the other direction. What I need to to is, that the edge of the curled view starts to "lift" in the bottom left corner of the page. With Your values the whole page "uncurls" until the edge of the curled view settles in the bottom right corner. Basically I need to mirror the normal curling effect. I hope I could explain it properly. |
Ah, right, now I understand. It's very easy to do that actually. You just Hope this helps.
|
Smile :-)! Okay now I figured it out. After watching my app making some very interesting dancing pirouettes while searching for good start and target angles, I am using these values now which seem to look fine: self.cylinderAngle = 5_M_PI/3; Many thanks for your hints! |
I have my app set up nicely now and I can flip pages forward (i.e. I can turn pages from right to left). But how can I flip backwards? When I call XBCurlView->curlView and I set the starting point of the cylinder to the left X-coordinate of the screen, the curling takes place from left to right but the visual effect is the same as curling from right to left.
Is there an easy way to curl into another direction?
The text was updated successfully, but these errors were encountered: