Мой UICollectionView:
@IBOutlet weak var mediaProfileCollectionView: UICollectionView!
я добавляю этот код в viewDidLoad ():
mediaProfileCollectionView.register(UINib(nibName: "MediaProfileCollectionView", bundle: nil), forCellWithReuseIdentifier: "MediaProfileCollectionViewCell")
, затем я использую в:
viewModelProfile.mediaProfileCollectionView
.asObservable()
.bind(to: mediaProfileCollectionView.rx.items(cellIdentifier: "MediaProfileCollectionViewCell", cellType: MediaProfileCollectionViewCell.self)) { (row,data,cell) in
cell.setMediaImage(from: data)
}.disposed(by: disposeBag)
, а затем я получить сообщение об ошибке:
Завершение приложения из-за необработанного исключения «NSInternalInconsistencyException», причина: «Не удалось загрузить NIB в комплекте:« NSBundle (загружен) »с именем« MediaProfileCollectionView »
Может кто-нибудь мне помочь ..