Error on "let sectionInfo = fetchedResultsController.sections![section]"

Viewed 21

// Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value on return sectionInfo!.numberOfObjects // It is under Xcode 14, iOS 16

 func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> 
                                                                             Int {
  let sectionInfo = fetchedResultsController.sections![section]
  return sectionInfo.numberOfObjects
 }
0 Answers
Related