【问题标题】:How to Set Vertical and Horizontal Scrolling to CollectionReusableView and CollectionVeiwCell respectively如何将垂直和水平滚动分别设置为 CollectionReusableView 和 CollectionVeiwCell
【发布时间】:2016-04-06 07:19:59
【问题描述】:

UICollectionView 的 ContentView 有两个 item。

  • CollectionReusableView。
  • CollectionViewCell。

在这里,我想将 CollectionReusableView 设置为具有垂直滚动方向的标题和具有水平滚动方向的 collectionVeiwCells。

我怎样才能做到这一点

这里,Top View 是 collectionReusableView,Bellow view 是 collectionViewCell。 我想单独为 CollectionveiwCells 进行水平滚动。

【问题讨论】:

    标签: uicollectionviewcell uicollectionviewlayout uicollectionreusableview


    【解决方案1】:

    我们不能为 UICollectionView 的单元格或 collectionReusableViews 分别设置水平和垂直滚动。只能单独设置滚动方向和弹跳到 UICollectionView 类。

    我已经计划自定义带有拉伸标题的 UIView,为此我在两个带有 horizo​​ntal 的 collectionViewCells 中安排了两个单独的 UITableViews vertical scrolling > 滚动方向。这个 collectionveiw 应该是 UITableViewController 的一部分,静态单元格应该只有垂直滚动。为了更清楚地了解这一点,请参考下图。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-01-09
      • 2020-08-17
      • 2015-05-31
      • 2013-11-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-17
      相关资源
      最近更新 更多