Comments (19)
I am gonna add a demo of this feature in the samples app as soon as possible.
Anyway, this can be achieved through the XBPageCurlView, but there are some stuff yet to be implemented.
from xbpagecurl.
Hey,
Any update on this?
Thanks :)
from xbpagecurl.
Hi, sorry for the delay.. I started to implement this but didn't commit anything yet. Been busy. I will try to continue to work on this feature this week.
from xbpagecurl.
Awesome. Thanks
from xbpagecurl.
I currently have the first working version in the branch "flip". I will continue to work on it to improve the API (suggestions are welcome) and I still have to implement correct dragging while the cylinder is snapped to another point.
The PageCurlViewController is the sample that uses this feature in a MapView. The process to make your view behave like that is quite manual yet. First you have to create a XBPageCurlView, configure it, add is as subview on top of the view you want to curl (add it to the superview of that one) and set it as hidden. Enable snapping and add some snapping points so that the cylinder will stick to them when the user releases his finger off the screen.
You also need another view that will act as a button that will start the curling (like in Google Maps for the iPad, where the "button" is the curled corner of the view on the bottom right of the screen). In the first touch, since the pageCurlView is hidden, we have to start to delegate the touches to it, hence you have to implement the touches* methods. In touchesBegan:withEvent: you also have to setup the pageCurlView for display and start its rendering loop.
One more thing that must be done is to implement XBPageCurlViewDelegate to be notified about snapping to the snapping point located at the bottom right which should stop the curlView and hide it and show the original mapView.
It's quite a lot of things to do to get this working yet :) . API suggestions are welcome.
from xbpagecurl.
Hey,
Thanks, let me give it a try. I keep you in touch (no pun intented) ;)
from xbpagecurl.
Hey I'm facing same issue, can't seem to figure out how to link the the finger touches to the curled page, all I managed to do is to put the curlView method in touchesEnded and it will curl the page to the position of the finger when touches ends, but if i put the method in touchesMoved, I will get a very odd behavior for it will try each time to curl a new page to the position of the finger, and it ends up curling the front View plus a bunch of shadows and it will not move with the finger.
I have another issue, since i'm working with epubs, I need to use a webview to display the content, and touchesBegan, touchesMoved and touchesEnded do not respond to the touches on the webview.
your help will be highly appreciated,
thank u in advance
from xbpagecurl.
I had an idea for a simpler solution to this. I will try to crank it up today.
from xbpagecurl.
Hey,
I have implemented that idea finally. There's a new sample called Page Curl that shows how to use the new feature. Basically, create an instance of XBPageDragView, place it somewhere (you can add any subviews into it) on your main view, set its viewToCurl property (it's an IBOutlet so you can link it in InterfaceBuilder), and you're all set already. Have a look in PageCurlViewController.* and PageCurlViewController_iPhone.xib to see how I did it. Quite simple. HTH
x
from xbpagecurl.
Thank u, I truly appreciate it, I hope it works on webview I will try it right away.
from xbpagecurl.
Its working perfectly thank u very much, just one tiny little problem, the dragging doesn't work on ipad1, same for simpleCurl, the animation of curling doesn't show on ipad1, it only works on ipad2 & 3 :s
Any idea why?
Anyway thk u again for ur efforts.
from xbpagecurl.
Unfortunately I don't have an iPad 1 to test it here. Can you give more detail about what does not work? Error messages? Chashes? Have you tried debugging it to find the source of the problem?
from xbpagecurl.
The problem is that XPageCurlView andXPageDragView don't show, for instance, in simple curl, when i click on curl button I directly see the backView, (no animation or curling occur) no clashes or errors shows in the console. When I click uncurl I'll see the front page back but again without any curling or any animation.
Thank u for ur assistance.
from xbpagecurl.
Hy again, is it possible to make the curl in the opposite direction for arabic books as well?
thank u in advance,
from xbpagecurl.
Well since I don't have an iPad 1 I can't reproduce this problem. If you could look further into it, you cant ix it and submit a pull request :)
Yea, I did not make the XBPageDragView flexible there yet. It must allow you to set the initial cylinder state so that you can drag from any direction. I will look into this later.
from xbpagecurl.
Hy there, no prob, I had it tested on another ipad1 the prob didn't occur, so I guess its only that device.
I'm currently integrating the curl effect to my program, it works but the prob is: in CATransition only a layer of the view gets removed but in the curl effect you implemented the whole view gets removed, I'm currently trying to make some changes to make it work. Any advice would be appreciated, hope things work with the initial cylinder state.
Thank u again for ur assistance,
from xbpagecurl.
Oh its fine I worked that out, Instead of hiding the curlView I update it and send to back. so no prob.
from xbpagecurl.
hi there,i download you latest code,it's works great.you'are amazing.
from xbpagecurl.
Ok. I suggest you open a new issue for the page dragging direction thing.
from xbpagecurl.
Related Issues (20)
- Weird behavior of the example project HOT 3
- tap to uncurl
- Curl -- corner doesn't always pick up HOT 4
- some bug
- XBPageCurl curling acting weird
- another gpus_ReturnNotPermittedKillClient crash HOT 2
- How to implement pages flipping like iBook? HOT 1
- Page Flipping in Two Page Book HOT 1
- Source differences between Git and Cocoapods HOT 1
- duplicate symbol _XBAnimationInterpolatorEaseInOut HOT 3
- updating the frame of the curlView for the next page HOT 2
- Calling drawImageOnNextPage: not working
- Unable to use this library in Swift.
- OpenGL Error 501 in console logs
- EXC_BAD_ACCESS in applicationWillResignActiveNotification
- curl animation don't work very well on IPhone 6 HOT 1
- curl effect render hide and show
- won't compile cleanly. Needed: In XBAnimation.h, the 4 blocks need to be marked extern
- https://github.com/bachelora/iOS-PageCurl-OpenGL
- Unable to integrate this onto the Swift project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xbpagecurl.