Skip to content

Instantly share code, notes, and snippets.

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