事象
cellはあるのにtitleLabelはnil
- StoryboardでcellにreuseIdentifierは設定ずみ
- CustomCellクラスにStoryboardからlabelのリンクはきちんと行われている
Fatal error: Unexpectedly found nil while unwrapping an Optional value
が出た
解決
override func viewDidLoad() {
super.viewDidLoad()
// ここいらない!
// Register cell classes
// self.collectionView!.register(CheckBoxCollectionViewCell.self, forCellWithReuseIdentifier: reuseIdentifier)
}
CocoaTouchからUICollectionViewControllerを作成しましたが、その時できるself.collectionView!.register()がいらなかったみたい