Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bartjacobs/3fd3c18bd5a49d9e41c1080d93d38204 to your computer and use it in GitHub Desktop.
Save bartjacobs/3fd3c18bd5a49d9e41c1080d93d38204 to your computer and use it in GitHub Desktop.
Using Fatal Errors to Add Clarity and Elegance to Swift - 2
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard let cell = tableView.dequeueReusableCell(withIdentifier: SettingsTableViewCell.reuseIdentifier, for: indexPath) as? SettingsTableViewCell else { fatalError("Unexpected Index Path") }
// Configure Cell
...
return cell
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment