【问题标题】:UICollectionView : Support for reordering on iOS 8UICollectionView : 支持在 iOS 8 上重新排序
【发布时间】:2016-05-27 19:12:55
【问题描述】:

所以我正在处理我的 Swift 应用程序中的 UICollectionView 重新排序。我发现新的 iOS9 功能做得很好。

我意识到它必须在 >= iOS9 设备上运行,并且我的应用必须与 iOS8 兼容。

有谁知道我应该用什么来代替那些?

@available(iOS 9.0, *)
public func beginInteractiveMovementForItemAtIndexPath(indexPath: NSIndexPath) -> Bool // returns NO if reordering was prevented from beginning - otherwise YES
@available(iOS 9.0, *)
public func updateInteractiveMovementTargetPosition(targetPosition: CGPoint)
@available(iOS 9.0, *)
public func endInteractiveMovement()
@available(iOS 9.0, *)
public func cancelInteractiveMovement()

【问题讨论】:

    标签: ios swift ios8 uicollectionview ios9


    【解决方案1】:

    我使用 LXReorderableCollectionViewFlowLayout 在 iOS 9 之前的应用程序中重新排序集合视图。效果很好。

    LXReorderableCollectionViewFlowLayout

    只需要实现一些委托调用并将其用作您的集合视图布局。

    【讨论】:

      猜你喜欢
      • 2021-03-19
      • 1970-01-01
      • 1970-01-01
      • 2015-05-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多