UIViewController transition with a UIScrollView peaking to initiate the transition

I find it difficult to understand the conceptually best way to implement the following:

I have a UIScrollview built into ViewControllerB that was introduced by ViewControllerA.

As soon as the user scrolls to the top of the UIScrollview, when he tries to pull more, when there is nothing more to scroll, I want this β€œdrag and drop” movement to pull and release the current ViewControllerB, leaving the ViewControllerA in the display.

How can I initiate this interactive ViewControllerB panning transition from the UIScrollView drag mechanism after reaching the top?

+4
source share
1 answer

As far as I understand your problem, you can go through these steps.

  • check if the scroll content offset contains view point 0,0, which means the scrollview has already reached the top

  • reject viewControllerB with animation Yes

0
source

Source: https://habr.com/ru/post/1527203/


All Articles