How can I nest a UIScrollView inside a UIScrollView, so that the user can scroll the inner UIScrollView?

前端 未结 4 1828
孤街浪徒
孤街浪徒 2021-01-05 05:42

I haven\'t tried that yet, but I assume that I would have to disable scrolling of the parent scroll view as soon as I know that the user will want to scroll in the child scr

4条回答
  •  时光取名叫无心
    2021-01-05 06:02

    UIScrollView has a property called scrollEnabled, which you can set to NO to disable scrolling in your parent scroll view.

    I haven't tried it yet, but you may just find that it Does The Right Thing, i.e., the inner scroll view scrolls until it can't scroll any more, at which point the outer scroll view scrolls.

提交回复
热议问题