I am taking an online course to learn Swift. I followed the code in the videos, but I am getting an error. It is coming from the line where I am registering a xib for a collection view. The code in the video has "bundle: nil", but that is where I am getting the:
"Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value"
Where am I going wrong?
Here is my code:
@IBOutlet weak var collectionView: UICollectionView!
override func awakeFromNib() {
super.awakeFromNib()
collectionView.register(UINib(nibName: "StoryCollectionViewCell", bundle: nil), forCellWithReuseIdentifier: "StoryCollectionViewCell")
}