こんにちは私はcollectionViewの項目に関する問題に直面しています。私の配列の素早く配列から行を見つける方法
var selectedPartecipants = [NSDate]() // this is the array [Item[0], Item[1] etc... ]
func collectionView(collectionView: UICollectionView, didDeselectItemAtIndexPath indexPath: NSIndexPath) {
if let deselectedData:NSDate = partecipantsAtEvent[indexPath.row].date! {
if let index = selectedPartecipants.indexOf(deselectedData) {
selectedPartecipants.removeAtIndex(index)
("item[0] cancelled - I have to search the item in collection view that now is new item[0] in the array")
}
}
}
私はアイテムの選択を解除する[0]私のcollectionViewで、コードがアイテムを取り消し、[0]、今の私collectionViewに新しいアイテムを見つけたい、新しいアイテムです[0]私の配列で。何か案は?
私は実際にあなたの問題が何であるか理解していません –