Привет, У меня возникла проблема с элементом коллекцииView.Как найти строку из массива в swift
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] в моем массиве , есть идеи?
Я действительно не понимаю, в чем ваша проблема –