1
我想選擇全部並取消選擇collectionView
的所有單元格使用全部選擇並全部取消選擇UIButton
? 請幫助任何人。我有UICollectionViewCell中的複選框圖像,我想顯示爲選定或未選中?
//Delegate Method cellForItemAtIndexPath
func collectionView(collectionView: UICollectionView,
cellForItemAtIndexPath indexPath: NSIndexPath) ->
UICollectionViewCell
{
//Get a reference to our storyboard cell
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(
"pickSomecell",
forIndexPath: indexPath) as! pickSomeGridViewController
//Show Images in grid view
cell.cellImage.image = self.arrAllOriginalImages[indexPath.row] as? UIImage
cell.toggleSelected()
//return cell.
return cell
}
感謝
你的意思是你有UICollectionViewCell要作爲選擇或取消選擇顯示覆選框圖像? –
是@BhumitMehta 但我想一起選擇所有圖像。 – kishor
你可以在CellForItemAtIndexPath中發佈你的代碼嗎? –