'dequeueReusableSupplementaryView' cannot be resolved without a contextual type iOS swift
Problem:
My code
collectionDataSource.
guard kind == UICollectionView.elementKindSe
fatalError("Unexpected supplementary view kind")
}
let headerView = collectionView.dequeueReusable
ofKind: kind,
withReuseIdentifier: "HeaderCell",
for: indexPath
) as! HeaderCell
// my configurations are here
return headerView
}
It shows error that 'dequeueReusableSupplementaryView' cannot be resolved without a contextual type.
I don't know how to solve
Solution:
The above code is good only.You have to check the configuration that you had made in the code.Because if it had some errors it will show like that.So check the code lines.
Comments
Post a Comment