-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Incorrect behaviour when calling insertPage at currentIndex #211
Comments
@crehbichler 👍 sounds like something we should fix |
I met this problem too, It seems that it has not been resolved yet? |
@msaps Is there any plan to fix this? Causes issues in one of my projects 😢 |
@jhmacdon sorry been really busy of late - will try and get time to work on it this week 👍 |
For now I am using the following workaround.
If adding something to the beginning of the data source, I am calling |
@kristiyandobrev @jhmacdon @zyflovelam @crehbichler this is now resolved as of v3.6.0 🎉 |
Hi,
so, let's say we have a
PageboyViewController
that is set up with 1 page.Then I am updating my input for the
PageboyViewControllerDataSource
and callinginsertPage(at: 0, then: .doNothing)
.What I would expect is that the new page will be inserted right before my current ViewController but I'm staying at the current ViewController, because I've specified .doNothing as
PageUpdateBehavior
.What happens is that the new page is indeed inserted before my current ViewController, but also it "cross-dissolves" to the inserted ViewController.
I see that this is implemented in the
func performUpdates
when it's checked if newIndex == currentIndex and then the crossDissolve + updateViewControllers is done. I guess that totally makes sense for deleting the page at the currentIndex, but I'm not sure if this is the desired behaviour for inserting?Thanks in advance!
(And thanks for building/improving this great library 👍 )
Version
Pageboy (3.2.0)
(actually used with Tabman (2.3.0) but this should be just related to Pageboy)
The text was updated successfully, but these errors were encountered: