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

Curled View Cut off In Simple Curl #26

Open
barronM opened this issue Sep 19, 2012 · 2 comments
Open

Curled View Cut off In Simple Curl #26

barronM opened this issue Sep 19, 2012 · 2 comments

Comments

@barronM
Copy link

barronM commented Sep 19, 2012

First of all, thank you so much for your excellent XBPageCurl class. This is awesome.

I'm not sure if this is an issue, or whether it's something I've just been unable to figure out:

I'm curling a view that does not cover the full screen. It is a subview that is effectively surrounded on all sides by a margin. The curl works, but when I curl the page with the cylinder at an angle, any part of the curled "page" that falls outside of the bounds of the XBCurlView is cut off. This seems reasonable, but when I try to change the size of the XBCurlView instance before calling "curlView: cylinderPosition: cylinderAngle: cylinderRadius: animatedWithDuration:" it offsets the curledView.

Is there another way to do this, or this functionality not supported yet?

Thank you so much!

@xissburg
Copy link
Owner

Hi there. The curl animation happens inside a view where OpenGL rendering happens, and it cannot happen outside the view bounds. When you call curlView... it will create a XBCurlView (which renders in OpenGL) with the same frame of the view you pass in the parameter.

XBPageCurl always creates the page triangle mesh of the same size of the view, so this is still not possible to achieve. We need to add one more parameter to these methods to specify the frame of the page inside of the XBCurlView. This way, we'll be able to create a large XBCurlView and curl only a subset of it, which is what you want. I will look into this later.

Thanks for the feature request.

@barronM
Copy link
Author

barronM commented Sep 19, 2012

Hey xissburg, thanks for the reply. That makes sense -- I tried to play around with the XBCurlView frame and curlView parameter separately, but was not able to get it working. Would love to have this feature, looking forward to seeing it in action someday!

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

No branches or pull requests

2 participants