Неустранимая ошибка: Индекс вне диапазона. Подойдя к комментарию ⇐ IOS
Неустранимая ошибка: Индекс вне диапазона. Подойдя к комментарию
func CollectionView(_ CollectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = colView1.dequeueReusableCell (withReuseIdentifier: «cell», for: indexPath) as! МояколлекцияViewCell cell.Image.image=UIImage (с именем: imagehome[indexPath.row]) //ошибка если (collectionView==colView2){ let cell = colView2.dequeueReusableCell(withReuseIdentifier:"cell1", for:indexPath) as! КоллекцияViewCell2 cell.Image1.image = UIImage (с именем: imageHome2[indexPath.row]) cell.Image1.layer.cornerRadius = cell.frame.height/2 возвратная ячейка } возвратная ячейка } Как устранить эту ошибку?
func CollectionView(_ CollectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = colView1.dequeueReusableCell (withReuseIdentifier: «cell», for: indexPath) as! МояколлекцияViewCell cell.Image.image=UIImage (с именем: imagehome[indexPath.row]) //ошибка если (collectionView==colView2){ let cell = colView2.dequeueReusableCell(withReuseIdentifier:"cell1", for:indexPath) as! КоллекцияViewCell2 cell.Image1.image = UIImage (с именем: imageHome2[indexPath.row]) cell.Image1.layer.cornerRadius = cell.frame.height/2 возвратная ячейка } возвратная ячейка } Как устранить эту ошибку?
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Разрешения, необходимые для того, чтобы поставить лайк комментарию/изображению/истории
Anonymous » » в форуме Php - 0 Ответы
- 10 Просмотры
-
Последнее сообщение Anonymous
-