【发布时间】:2015-08-28 17:38:49
【问题描述】:
我正在尝试找出哪些 NSIndexPaths 既可见又同时被选中。两个数组的初始化如下:
let visibleSelectedItems = collectionView.indexPathsForVisibleItems()
let selectedItems = collectionView.indexPathsForSelectedItems()
我基本上是在寻找 2 个数组的交集。索引路径声明为NSIndexPath(forItem: Int, inSection: Int)
【问题讨论】:
标签: ios arrays swift swift2 nsindexpath