Ошибка удаления из очереди пользовательского UICollectionViewCellIOS

Программируем под IOS
Anonymous
Ошибка удаления из очереди пользовательского UICollectionViewCell

Сообщение Anonymous »

При использовании бета-версии Xcode 16 я получаю следующую ошибку выполнения.

Код: Выделить всё

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Expected dequeued view to be returned to the collection view in preparation for display. When the collection view's data source is asked to provide a view for a given index path, ensure that a single view is dequeued and returned to the collection view. Avoid dequeuing views without a request from the collection view. For retrieving an existing view in the collection view, use -[UICollectionView cellForItemAtIndexPath:] or -[UICollectionView supplementaryViewForElementKind:atIndexPath:]. 
Он попадает в мой

Код: Выделить всё

@UIApplicationMain
class AppDelegate
что затрудняет поиск фактического кода-нарушителя.
В сообщении об ошибке говорится, что Dequeued View — это собственный класс, расширяющий UICollectionViewCell. :

Код: Выделить всё

Dequeued view: 

Подробнее здесь: [url]https://stackoverflow.com/questions/78917217/error-dequeuing-custom-uicollectionviewcell[/url]

Вернуться в «IOS»