so I have this strange problem that has been listening to me for the past few hours.
I have a framework in which I created a protocol called ChatDelegate (code below)
public protocol ChatDelegate: class {
func chat(_ chatCollectionView: UICollectionView, didSelect message: Message)
}
and a ViewController (not within the framework) that corresponds to ChatDelegate, e.g.
extension ChatContainerViewController: ChatDelegate {
func chat(_ chatCollectionView: UICollectionView, didSelect message: Message) {
print("did select")
}
}
but the compiler still complains that ChatContainerViewController is not protocol compliant and I donβt understand why? The function has the same title (I also tried to put the public in front ... did not help).
Any help would be greatly appreciated.
UPDATE
I get it. The problem was that I had the Message class in my project and within, and the compiler did not know which one to choose. Fixed adding ModuleName in front (ModuleName.Message) .: D