0
Я переношу приложение iOS в Swift 3, и у меня есть это сообщение об ошибке на моем ChatViewController.Swift - требуемый метод не реализован: - [JSQMessagesViewController collectionView
2017-02-21 16:40:40.599 Jaco[52613:2864859] *** Assertion failure in -[Jaco.ChatViewController collectionView:messageDataForItemAtIndexPath:], /Users/Royal/dev/jab/ios/Pods/JSQMessagesViewController/JSQMessagesViewController/Controllers/JSQMessagesViewController.m:491
2017-02-21 16:40:40.609 Jaco[52613:2864859] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'ERROR: required method not implemented: -[JSQMessagesViewController collectionView:messageDataForItemAtIndexPath:]'
Вот часть моего кода
// DATA SOURCE 1
func collectionView(collectionView: JSQMessagesCollectionView!,
messageDataForItemAtIndexPath indexPath: NSIndexPath!) -> JSQMessageData! {
let data = self.messages[indexPath.item]
return data
}
// DATA SOURCE 2
override func collectionView(_ collectionView: UICollectionView,
numberOfItemsInSection section: Int) -> Int {
return messages.count
}
Я попытался добавить «переопределение», но сообщение об ошибке все еще там.
Любые идеи, как исправить это? Спасибо за вашу помощь!