Nested UIScrollView prevents bounce ignition and allows parent paging when at the end of the list

I want to recreate the same behavior as the weather app in iOS7. Here is a screenshot:

ios7 stock weather app

The main screen is a UIScrollView that contains a nested UIScrollView that scrolls left and right.

I have implemented this in many ways, but I do not understand that this is true. If I just do something like this:

| UIScrollView
| ---> UICollectionView

When I scroll left and right quickly, this will cause the parent screen to crash, which will cause you to see the next page. I do not want it. I tried using all the delegates to try to disconnect the parent while the child scrolls, but this never behaved and was awkward.

UICollection UIScrollView, . , UICollectionView , UIScrollView. .

, , , . ? iPhone iPhone iOS7, , . .

+4
1

scrollview , , no.

Parent_scrollview
  container_scrollview->bounces no
    child_scrollview

- , scrollview, , . scrollview , , .

+9

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


All Articles