xissburg / XBPageCurl

A decent page curl transition for iOS.
MIT License
671 stars 135 forks source link

Is it possible to curl from left to right currently? #37

Closed marcpalmer closed 11 years ago

marcpalmer commented 11 years ago

I can't see how to do this - there doesn't seem to be support for the curl direction - I basically want the inverse of what is there now, like dragging the left page of a two-page spread book in iBooks.

I imagine this "just" means inverting some angles. Do you think it is much work? Any pointers would be much appreciated, and of course I will make pull requests as necessary.

marcpalmer commented 11 years ago

Actually, wouldn't it be best if we could make it so that when you start dragging that this sets the direction of the curl - so you can drag from any point near any edge and it will curl in that direction. Then we'd just need a mechanism to set where you permit drags to start - but really this should integrate with UIGestureRecognizer. The built in UIPageViewController stuff uses a UIPanGestureRecognizer. If we could allow customisation of the recognizer used, then you could create one that only responded to certain start regions.

xissburg commented 11 years ago

It's possible to curl from any direction. There were a few similar issues people opened in the past: https://github.com/xissburg/XBPageCurl/issues/12 https://github.com/xissburg/XBPageCurl/issues/15 https://github.com/xissburg/XBPageCurl/issues/27

You just have to rotate the cylinder until the page starts to curl in other direction.

The XBPageDragView needs some code to start the drag based on its relative location on the parent view (the view it curls). Would have to think more about a good mechanism or/and also an API that makes it flexible enough.

marcpalmer commented 11 years ago

Thanks for the info. I'll have a play and let you know.