XBPageCurl
XBPageCurl copied to clipboard
User Interaction with curled view
Hi, I am trying to use this library to curl down the corner of a view and keep it curled down. I just curl the very top corner, so I want the user to be able to continue to interact with the rest of the view while it is curled. Right now, this doesn't seem possible. I started from the SimplePageCurl example and just changed the positions and angles to get it to curl from the top right corner. Now it seems like the curled view is just an image and I can't interact with the controls on the screen.
Any advice would be very appreciated. Very cool library so far. It looks like it will really help me if I can get past this one issue.
Are you sure you are using the most up to date version? Did you don anything special with your setup? By default the views behind the curled view will be touchable, only the visible part actually. This is a feature that was added not so long ago.
It is the view that I am curling that I want to interact with though. The front view has button at the bottom and I just want to turn down its top right corner. I want the rest of the top view to be enabled for user interaction.
Oh now I get it. It is not possible to interact with the contents of the view which is being curled, yet. The view is rendered into a texture, so what you actually have on the screen is an static image of it. Perhaps I could change it so that only the curled region and the rear facing part are rendered with OpenGL and the rest I can keep intact. Then, I can delegate the touches inside the page to the curled view and the touches outside the page to the underneath view. I will look into this possibility later..
One possible dirty hack would be to place an identical button/control on top of the original and above the curl view after you start to curl.
i am also looking for the same :)
Yes, I have added an ugly hack where I put the button on top of the curl view. It does work. Thanks!
Can you share that sample with a button over curl view ?
On Nov 1, 2012, at 8:14 PM, murthyveda2000 [email protected] wrote:
Yes, I have added an ugly hack where I put the button on top of the curl view. It does work. Thanks!
— Reply to this email directly or view it on GitHub.
@bibeputt well, just add a button over the curl view. You can add it as subview to the superview of the curl view and to make sure it will appear in the front, you can use the bringSubviewToFront: method.
I tried to put a Button on the curl view but I got some problems:
- Button is fullscreen after curl up
- or button is not available...
Can you post your solution...
@mooseDev do not add the button as a subview of the curlView, it must be a sibling.
yep I tried but as I mentioned: Button will overlay whole view or is not accessable at all...
UIButton *bt = [[UIButton alloc]initWithFrame:self.curlingView.superview.frame];
bt.backgroundColor = [UIColor yellowColor];
[self.curlingView.superview addSubview:bt];
[self.curlingView.superview bringSubviewToFront:bt];
Well, that is quite weird. I don't think this problem is related to XBPageCurl. Try swapping the XBCurlView with a regular view and see what happens.