Giter Club home page Giter Club logo

Comments (71)

xissburg avatar xissburg commented on May 21, 2024

Do you mean you don't want to allow the page to turn at a non-straight angle such as 45 degrees? You want to keep the curl straight/vertical?

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Exactly.

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

I have pushed a few changes in order to support limiting the angle of the cylinder. You can now use the XBPageCurlView's minimumCylinderAngle and maximumCylinderAngle to limit the angle in an interval. I think M_PI_2 for both will work for you. You should also set the XBPageDragView's cornerSnappingPoint.angle to M_PI_2 in this case. Let me know whether this helps.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Wow, thanks! I'll give it a try and let you know if it works.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Any idea why my XBPageDragView doesn't seem to be working?

    CGRect r = CGRectZero;
    r.size = self.view.bounds.size;

    self.curlViewDrag = [[XBPageDragView alloc] initWithFrame:r];
    self.curlViewDrag.viewToCurl = webView;
    [self.curlViewDrag refreshPageCurlView];
    //self.curlViewDrag.cornerSnappingPoint.angle = M_PI_2;

    [self.view addSubview:self.curlViewDrag];

Is the init code I'm using...the full source is over here: https://docs.google.com/file/d/0B-sm1N6j2oahSTd6NGIyakptMXc/edit?usp=sharing

(Relevant file is ReadingView.m)

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

It isn't rendering anything?

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

I suppose it might be, but when I run it nothing happens. I don't get any errors, but nothing else happens. Neither curl nor drag functionality appears. Is it possibly because of my WebView handling touch events (js)?

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

The XBPageDragView must be added as a visible subview in your hierarchy, like a button. It must be on top of everything.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

I changed the code thus:

    CGRect r = CGRectZero;
    r.size = self.view.bounds.size;

    self.curlViewDrag = [[XBPageDragView alloc] initWithFrame:r];
    self.curlViewDrag.viewToCurl = webView;
    self.curlViewDrag.cornerSnappingPoint.angle = M_PI_2;

    [self.curlViewDrag refreshPageCurlView];
    [self.view addSubview:self.curlViewDrag];
    [self.view bringSubviewToFront:self.curlViewDrag];
    [self.curlViewDrag refreshPageCurlView];

And it's still not working. It might be worth noting that whenever I created it via Interface Builder, I get EXC_BAD_ERROR. It seems to happen in refreshPageCurlView on this line:

self.pageCurlView = [[XBPageCurlView alloc] initWithFrame:self.viewToCurl.frame];

I only get that error, though, when I create it via Interface Builder. My viewToCurl is on a webview, but it happens even when I set it to other views.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

I'm not using storyboards anymore (although maybe I didn't get rid of them properly?) but it's still not working, even when I removed the refreshPageCurlView from the setter for curlViewDrag, which is where the error was originating. Now, when I tap to drag, I just get black, or white. Like the view was removed or hidden.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Thanks for all your help. I've managed to fix it: turns out the root of the problem was that I hadn't included everything that was necessary in my build. /facepalm

But now that it's working, I'd love some help with another issue I'm having. I added the snapping point you suggested, and it sort of works: when you drag from the right, it doesn't snap to the bottom, and will allow you to drag fully across the view. Unfortunately, when it's let go mid-drag, it still snaps to reveal the bottom-right area, instead of continuing on across the view.

Also, is there a way to strictly conform the path to side-to-side curling, with no up and down? This is close, but I was wondering. And can a curl start on the left, and move to the right?

Thanks for all the help!

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

Sorry for the lack of updates. Are you using the minimum/maximumCylinderAngle as stated above? If you want it to snap to the left so that the page will disappear, you should try placing a snapping point at (0,0) with radius 0 and angle M_PI_2. It snaps to the point that is closest to the cylinder axis so.. it will only snap to this point on the left when it is past the center of the screen. I just had one idea.. the snapping points should have a 'weight' that allows you to control which point should win the battle. For instance, if the left snapping point has a higher weight than the one on the right (the default cornerSnappingPoint), the page will snap to it even before the cylinder axis hits the horizontal center of the screen. Sounds interesting..

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Thanks! That solves part of the problem. It now moves all the way across the screen, but only if the drag has moved at least halfway across the screen :/ If I just start the drag and only move a little ways across the screen, it still snaps to where it shows the bottom-right corner. Also, maximum and minimum cylinder angle don't seem do do anything to only allow right-to-left drag.
Am I missing something?

This is the code I'm using:

    self.curlViewDrag.pageCurlView.maximumCylinderAngle = M_PI_2;
    self.curlViewDrag.pageCurlView.minimumCylinderAngle = M_PI_2;
    self.curlViewDrag.cornerSnappingPoint.angle = M_PI_2;
    self.curlViewDrag.cornerSnappingPoint.radius = 0;
    self.curlViewDrag.cornerSnappingPoint.position = CGPointMake(0, 0);

    [self.curlViewDrag refreshPageCurlView];

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

Hey, I have added the weight on the snapping points. Try setting a weight higher than 1 on the snapping point you have on the left. I would try a weight of 2 to start with.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

That worked perfectly! I must say, you are the most active and communicative and helpful developer I've met. Thanks for all the hard work. Any suggestions for maximumCylinderAngle and minimumCylinderAngle? Thanks again!

EDIT:

I also just noticed something...I utilized the addSnappingPoint function you provided in the recent commit, so that it would snap to both sides of the screen - left and right.

- (void) initPageDrag {
    float width = self.view.bounds.size.width;
    float height = self.view.bounds.size.height;
    self.curlViewDrag.viewToCurl = self.view;
    //Remember to refreshPageCurlView on rotate,
    //and to inhibit rotate mid-drag

    self.curlViewDrag.pageCurlView.maximumCylinderAngle = M_PI_2; //doesn't seem to work...
    self.curlViewDrag.pageCurlView.minimumCylinderAngle = M_PI_2; //doesn't seem to work...

    [self.curlViewDrag.pageCurlView addSnappingPoint:
     [[XBSnappingPoint alloc] initWithPosition:CGPointMake(width, height/2) angle: M_PI_2 radius: 0 weight: 2 ]];

    self.curlViewDrag.cornerSnappingPoint.angle = M_PI_2;
    self.curlViewDrag.cornerSnappingPoint.radius = 0;
    self.curlViewDrag.cornerSnappingPoint.weight = 2;
    self.curlViewDrag.cornerSnappingPoint.position = CGPointMake(0, height/2);

    [self.curlViewDrag refreshPageCurlView];
}

However I noticed that using the above code, when it snaps the the right, a dark overlay appears over the view, but doesn't happen when it snaps the the left. I know i can probably get around this by hiding it or whatever for now, but I was just curious. Also, can drag speed be controlled?

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

I also thank you for the ideas which improve the framework. You should set both the maximum and minimum angles to M_PI_2.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

I thought I did...?

self.curlViewDrag.pageCurlView.maximumCylinderAngle = M_PI_2;
self.curlViewDrag.pageCurlView.minimumCylinderAngle = M_PI_2;
//or
[self.curlViewDrag.pageCurlView setMaximumCylinderAngle:M_PI_2];
[self.curlViewDrag.pageCurlView setMinimumCylinderAngle:M_PI_2];

Neither seemed to work...

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

What happens instead?

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

The rotation remains as flexible as usual.

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

Ouch, there was a bug in my code. Please check my last commit.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

That works perfectly. Thanks, again. Question: is there an official way to know when a point has been snapped to, or when the drag is over? I don't see one in the code. For now I just hijacked this code:

    [self setCylinderPosition:closestSnappingPoint.position cylinderAngle:angle cylinderRadius:closestSnappingPoint.radius animatedWithDuration:kDuration completion:^{
        if ([weakSelf.delegate respondsToSelector:@selector(pageCurlView:didSnapToPoint:)]) {
            [weakSelf.delegate pageCurlView:weakSelf didSnapToPoint:closestSnappingPoint];
        }
        NSLog(@"snap done");
    }];

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

Just implement the XBPageCurlViewDelegate protocol.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

That's so obvious now that I examine the code...I need something to eat. Thanks.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Oh, and there's a similar bug with the delegate being reset on refreshPageCurlView...that or I'm doing something wrong.

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

I see.. the XBPageDragView needs the delegate as well.. we'll have to use something else there..

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

I ditched the delegate in favor of notifications. Now multiple instances can receive the snapping events and other that are still to come.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Works beautifully!

That gray overlay I told you about when it snaps to the right is quickly becoming the bane of my existence, and hiding PageCurlView is slowing things down a bit too much...any suggestions?

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Actually, nevermind. Doing a refreshPageCurlView when the snap is complete fixes that problem. ;)

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Hmm....Interesting issue I'm getting...

I have an UIImageView, that for most of the application's use is hidden. However, when the user starts a drag, I show the UIImageView (it is the viewToCurl) and then send touches to XBPageDragView. When the drag is over, I hide the UIImageView.

Problem: When the drag starts, I get a fast flicker where first the UIImageView shows, then the XBPageDragView (or pageCurlView) shows, but it's empty of the viewToCurl, then it updates and the pageCurlView is visible inside it and all is right.

I know this might be a niche issue, but if you have any solutions to offer that would be great. From breakpoints, etc., it seems to be coming from code inside XBPageDragView. Thanks - I can post some code if it'd help.

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

Show code.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Here: https://gist.github.com/matt-curtis/5174689

Skip down to the comment where it says "trouble code here". What happening is this: I don't want page curls to always happen over my webview, so I parse touches to be selective. Since there's issues with touch detection on webviews, I have JS pass the coordinates of touches/drags etc, and pass those touches on to the XBPageDragView. It works smoothly, and without any perceivable slow-down...except the slight flicker issue.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

From what I can tell the problem might be related to when everything draws...it seems that the pageCurlView is black, or empty initially...not sure.

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

Where do you start/stop the animation? Aren't you using XBPageDragView? With XBPageDragView you can limit the area where the user can drag the page. One possible solution to kill the flicker is to call drawViewInFrontOfPage before swapping the views.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Hmm. This is interesting. I'm starting to suspect that XBPageDragView might just not like UIImageViews. Even when I don't hide the UIImageView, I still get the bug. The view now also keeps transparent after the first drag, instead of drawing the view on top of itself... I'll have to experiment more, maybe with a non-updating Image view instead of one that updates.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

I haven't come up with a viable solution to this, so far...at least not with how I'm currently doing things. I can't seem to get rid of that flicker. Frustrating.

I should also mention drawViewInFrontOfPage doesn't seem to work (I get an error?), but I might be using it incorrectly.

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

Are you referring to the same code above? If not show some code. XBPageCurl simply uses -[CALayer renderInContext:] in order to draw the view in an OpenGL texture and it does not work perfectly in a few situations.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

I'm going to start a fresh project, and see if the same thing happens with a UIImageView, or if it's just my code...

Sent from my iPod

On Mar 24, 2013, at 10:15 AM, xiss burg [email protected] wrote:

Are you referring to the same code above? If not show some code. XBPageCurl simply uses -[CALayer renderInContext:] in order to draw the view in an OpenGL texture and it does not work perfectly in a few situations.


Reply to this email directly or view it on GitHub.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

I'm using the code above, still...I think the problem might be somehow related to Clears Graphics Context, which has been known to draw that black transparent rect before rendering. What I don't get is that although I have it unchecked on both XBPageDragView and my UIImageView, I still see it...

And weirder, it didn't do it on my other project.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Phew, finally made some headway towards figuring this out. The problem seems to be this block of code (sort of my initialization code, sets up the snapping points on both sides of the screen):

    float width = self.view.bounds.size.width;
    float height = self.view.bounds.size.height;

    [self.curlViewDrag.pageCurlView addSnappingPoint:
     [[XBSnappingPoint alloc] initWithPosition:CGPointMake(width, 0) angle: M_PI_2 radius: 0 weight: 2 ]];

    self.curlViewDrag.cornerSnappingPoint.angle = M_PI_2;
    self.curlViewDrag.cornerSnappingPoint.radius = 0;
    self.curlViewDrag.cornerSnappingPoint.weight = 2;
    self.curlViewDrag.cornerSnappingPoint.position = CGPointMake(0, 0);

Seems like there some sort of issue with changing corner snapping point...whatever the case, the following fixed things:

    float width = self.view.bounds.size.width;
    float height = self.view.bounds.size.height;

    [self.curlViewDrag.pageCurlView addSnappingPoint:
     [[XBSnappingPoint alloc] initWithPosition:CGPointMake(width, 0) angle: M_PI_2 radius: 0 weight: 2 ]];

    [self.curlViewDrag.pageCurlView addSnappingPoint:
     [[XBSnappingPoint alloc] initWithPosition:CGPointMake(0, height/2) angle: M_PI_2 radius: 0 weight: 2 ]];

    self.curlViewDrag.cornerSnappingPoint.angle = M_PI_2;

    [self.curlViewDrag refreshPageCurlView];

Also, I'd propose a removeAllSnappingPoints function - currently you can only and remove specific ones.

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

The problem might be that the page mesh was not properly visible because of the cylinder position, and not because of texture or framebuffer issues. Although it is not very clear why would that happen in your example.

I've added the removeAllSnappingPoints method by the way.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Thank you.

Occasionally I will get "Failed to create framebuffer: 8cd6" on my drags, followed by multiple lines of "1286". What could I be doing that causes this?

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Actually, I don't think that's related to OpenGL, possibly another part of my code. Disregard it.

Question: XBPageDragView doesn't seem to respond well to very short drags. When using it in this case...:

2013-03-29 21:09:59.138 BookIt[61161:907] dragBegin - Point: {232, 409}
2013-03-29 21:09:59.157 BookIt[61161:907] dragMove - Point: {233, 409}
2013-03-29 21:09:59.195 BookIt[61161:907] dragMove - Point: {224, 409}
2013-03-29 21:09:59.200 BookIt[61161:907] dragEnd - Point: {224, 409}

It never fully registered dragEnd (touchesEnded) and the curl stops where it's at, instead of the snapping point. As far as I can tell, all the code to get the nearest snapping point works fine, it's the [self setCylinderPosition] selector that is apart of the problem. I'm wondering how to avoid this situation.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Actually...I think I may have fixed my own problem. Working with this has certainly been an experience, I've never felt more like a newbie with something.

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

@matt-curtis do you still have any problems?

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Besides the occasional 'can't create framebuffer' issue, no. I lowered how often I see that drastically by changing how often you can curl, but it still happens sometimes. Any tips on avoiding it?

Sent from my iPod

On Apr 1, 2013, at 8:03 AM, xiss burg [email protected] wrote:

@matt-curtis do you still have any problems?


Reply to this email directly or view it on GitHub.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Oh, and I was wondering: why is it that curls get buggy and slow when I run my app without the debugger?

Sent from my iPod

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

The "Failed to create frame buffer: .." error happens probably because the size of the view is zero when the createFramebuffer method is called. You could check it yourself by setting a breakpoint around XBFilteredView.m:963.

The lower frame rate issue is really weird and happens with me if I, for instance, curl the page, push the home button and touch the app icon again.. the frame rate drops a noticeable amount. This is yet to be investigated.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

XBFilteredView?

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

yes(?)

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

I don't see a file named that. Am I not looking in the right place?

Sent from my iPod

On Apr 7, 2013, at 7:03 PM, xiss burg [email protected] wrote:

yes(?)


Reply to this email directly or view it on GitHub.

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

Ouch sorry… that is from another project, lol.. it is XBCurlView:371.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Thanks, I'll check that out. Speaking of the slowdown issue, I noticed that
when I turn off OpenGL Frame Capture in scheme settings, the slowdown issue
occurs, even when I'm debugging. So perhaps it's related to that?

EDIT:
Funny, I created the breakpoint...and now, I can't get the framebuffer issue to show. Odd. I must've done something to the code that was causing it. Either way, good to know in case it happens again.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

If the size of the view is zero...how do I fix that?

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

Is that a problem? The frame buffer is recreated after the size of the view changes. The view size is initially zero probably because of auto-layout and whatnot.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

I'm not sure, actually. I'll double check.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Here's what the error looks like when I get it:
Untitled 2
Untitled 3
Untitled 4
Untitled

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

That is about right, the view size is zero then it will fail to create the framebuffer. Anyway, that is not a problem since it is going to be recreated after the view gets its actual (non-zero) size. You can just ignore that error, which can be actually considered a warning.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Hmm. I get this error in the log every few curls, and no curl happens when I do:

Usually happens on swipe curls, though.

2013-04-28 21:14:51.807 BookIt[3823:907] Failed to create framebuffer: 8cd6
2013-04-28 21:14:51.824 BookIt[3823:907] 1286

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

Well, that is a GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT error followed by a GL_INVALID_FRAMEBUFFER_OPERATION.. do these errors happen only when the view size is zero? Doesn't the view get a new non-zero size thereafter which also leads to a call to layoutSubviews?

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

It appears to happen only when the view size is zero...both viewportHeight and viewportWidth are 0. That's on the "Failed to create framebuffer" break point. How would I test for the other half?

BTW...I call refreshPageCurlView every time a curl is finished. Related?

EDIT...

Ah, that seems to be apart of the problem. Commenting out my call to that fixed it. Oddly enough, lack of it slowed down my app somewhat.

I need the refreshPageCurlView call because otherwise, I get a black, semi-transparent rectangle that flickers.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Haha! I am triumphant! It turns out all this stems from my stupid implementation of passing drag touches from a UIWebView to the Curl View. I've ironed out the kinks, and it seems almost buttery.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

I'm also still dealing with the issue of when not debugging, curling and the app slows down dramatically. I haven't managed to find the source yet...

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

You should profile the app with Instruments (Time Profiler).

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

The problem seems to be around here:

untitled

I'll muck around and see if I can resolve that...

Also a link to the instruments log file: https://docs.google.com/uc?export=download&id=0B-sm1N6j2oahVXBOVm0zOC1JZjg

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Ha. Turns out, I'm really, really, really bad at OpenGL drawing, and I've actually managed to make the code sooo much worse.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Hmm. I've been working (not sure if you can call it that) with the OpenGL code, and while I did manage to make 3d rainbows, my iPod crash, and Instruments commit homicide, I also found that

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Do you have any other suggestions? I've had no success on my own with the OpenGL code...I just know it that the slow down only occurs when OpenGL ES Frame Capture is unchecked in Scheme settings. :/ You've been extremely helpful and I appreciate it.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

I've managed to isolate the issue to my calling this block of code when a snap is complete:

    [self.curlViewDrag refreshPageCurlView];

    [self.curlViewDrag.pageCurlView removeAllSnappingPoints];

    [self.curlViewDrag setUserInteractionEnabled:NO];

For whatever reason, it causes issues when done immediately when XBPageCurlViewDidSnapToPointNotification is called. I'm using a timer now and it seems to solve the problem, but, is there a more efficient way of doing this? I'm needing to refresh the curl view because of the black overlay issue I mentioned. I'm assuming that part of this issue is coming from that fact that I'm refreshing the view before the curl is completely done. Is there a way to tell for sure when things are done?

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

There was what I think is a bug in the XBPageDragView code that was causing this. I'll update this with my discoveries later.

from xbpagecurl.

xissburg avatar xissburg commented on May 21, 2024

Well, this thread has become a mess already :P. I will close it by now and if you have any other more specific issues, please open a new one.

from xbpagecurl.

matt-curtis avatar matt-curtis commented on May 21, 2024

Agreed...70 comments? What was I doing? Anyway, I guess I should still post my solution. The problem was here:

- (void)pageCurlViewDidSnapToPointNotification:(NSNotification *)notification
{
    XBSnappingPoint *snappingPoint = notification.userInfo[kXBSnappingPointKey];
    if (snappingPoint == self.cornerSnappingPoint) {
        self.hidden = NO;
        _pageIsCurled = NO;
        self.viewToCurl.hidden = NO;
        [self.pageCurlView removeFromSuperview];
        [self.pageCurlView stopAnimating];
    }
}

It doesn't account for all snapping points (which was an issue, since I was only using the snapping points array).

from xbpagecurl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.