0
func backBtnAction(){
var index = collectionView?.indexPathsForSelectedItems() as! [NSIndexPath]
collectionView?.scrollEnabled = true
collectionView?.reloadItemsAtIndexPaths(index)
}
如何在collectionview
得到indexpath
......就像我現在這樣Downcast from'[NSIndexPath]?'到'[NSIndexPath]'只打開optionals;你的意思是使用'!'嗎?
var index = collectionView?.indexPathsForSelectedItems() as! [NSIndexPath]