簡體   English   中英

UICollectionView:支持在iOS 8上重新排序

[英]UICollectionView : Support for reordering on iOS 8

所以我正在處理我的Swift應用程序中的UICollectionView重新排序。 我發現新的iOS9功能可以很好地完成工作。

我意識到它必須在> = iOS9設備上運行,並且我的App必須與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()

我已經使用LXReorderableCollectionViewViewFlowLayout在iOS 9之前的應用程序中對集合視圖進行重新排序。 效果很好。

LXReorderableCollectionViewFlowLayout

只需實現一些委托調用並將其用作您的集合視圖布局即可。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM