如何使contview滚动滚动卷轴自然行为
我需要做这个应用程序。 当滚动主视图时,视图层次结构会像这样
UIScrollView
-UIView (Main View)
--UIView (Top View Container)
--UITableview
,如果表观视图具有许多单元格,则表视图应升至顶部,一旦它到达顶部。用户应该能够滚动表视图单元格。我能够实现它,但它并不能自然滚动。
附加了我的代码 https://githbithub.com/github.com/iamshimshimak/iamshimak/finchhomescreenredesign.git
I need to do this app. The view hierarchy goes like this
UIScrollView
-UIView (Main View)
--UIView (Top View Container)
--UITableview
When scrolling up the Main View, If table view has many cells, the table view should go to the top, and once it reaches the top. The user should be able to scroll the table view cells. I was able to achieve it but it doesn't scroll naturally.
Attached my code https://github.com/iamshimak/FinchHomeScreenRedesign.git
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,切勿将tableview放入卷轴上,这是一个不好的做法。您可以只使用tableView标头,然后在表观视频单元格之前嵌入任何类型的视图。
这是我如何处理它的狙击:
如您所见,我将Uiview嵌入为页脚,而另一个名为Headerview作为标头的Uiview,
但是如果您坚持要在scrollview中使用tableview,则可以尝试使用scrollview disemview和测定哪个滚动浏览正在滚动
First, never put tableview inside a scrollview, it's a bad practice. You could just use tableview header and embed any type of view do you want before the tableview cells.
here's a snipeste on how I deal with it:
as you can see, I embedded a UIView as a footer and another UIView named headerView as a header
but if you insist of using a tableview inside a scrollview, you can try using a scrollview delegate and detech which scrollview is scrolling