nachonavarro / Pages

📖 A lightweight, paging view solution for SwiftUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

transition problem with pageCurl transition & didFinishAnimation

RajaSeshadri opened this issue · comments

The adaptation to SwiftUI works great thanks.
I needed this for pageCurl transition and not the scroll transition. However, the transition animation does not work properly. The top page curls up nicely and the next page is visible behind it. However, when the animation is complete the second page curls away too leaving a blank white page. There is an error message shown "Unbalanced calls to begin/end appearance transitions" .

Two things - (1) this problem does not occur when the transition type is scroll -only there for pageCurl type. (2). if I comment out the UIPageViewControllerDelegate method didFinishAnimating finished the problem goes away - the transition works nicely.

I am not sure that the problem is your code, because I get the same problem just using the code in the tutorial from Apple ( https://developer.apple.com/tutorials/swiftui/interfacing-with-uikit ) .

I can send you the complete example if needed. I am hoping that you can figure out a solution.

If this doesn't happen only with Pages then it seems it's an underlying problem with the
UIPageViewControllerDelegate. We'll need to wait for Apple to fix it.