1
如何从下面的cole中获取项目值?集合视图indexpathforitematpoint项目
let pointInTable: CGPoint = sender.convertPoint(sender.bounds.origin, toView: self.collectionView)
let cellIndexPath = self.collectionView?.indexPathForItemAtPoint(pointInTable)
println(cellIndexPath)
我目前显示这个,但需要整数值。
Optional(<NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 1})
什么“整数值”?你不明白日志消息的哪一部分?你不知道NSIndexPath是什么?你不知道什么是可选的?这里有什么问题? – matt 2014-10-29 15:15:47