Полагаю, вы зарегистрировали перо нижнего колонтитула / заголовка следующим образом:
segmentCollectionView.register(UINib(nibName: /* CellNibName */, bundle: nil), forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter, withReuseIdentifier: /* CellId */)
, а затем удалите клетку из очереди вот так
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
if kind == UICollectionView.elementKindSectionFooter {
let cell = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: /* CellId */, for: indexPath) as! /* Your Class */
}
else {
}
}
- так что хитрость заключается в том, что ваш зарегистрированный класс ячеек в нижнем колонтитуле вы можете перейти к файлу xib и добавить
UITableView
внутри ссылки / * Ваш класс * /
- ссылка
UITableView in the cell class not the
UIViewController class that contains the
UICollectionView`
- затем передайте данные, которые вы хотите, когда вы снимаете очередь с ячейки и выполняете все свои операции внутри класса ячейки