티스토리 뷰
CollectionView
func prepare(for segue: UIStoryboardSegue, sender: Any?)
devkhpark 2016. 10. 15. 19:21
There are two methods to select first indexpath in collectionview like below
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
let indexPath = self.collectionView!.indexPathsForSelectedItems?.first
let indexPaths = self.collectionView!.indexPathsForSelectedItems!
let indexPath = indexPaths[0] as NSIndexPath!
}
댓글