I\'m creating a UITableViewController with Swift language and in a method
override func tableView(tableView: UITableView?, cellForRowAtIndexPath indexPath: N
You can use the optional chaining syntax for this call (setting cell.textLabel.text to nil if indexPath is nil):
cell.textLabel.text = indexPath? ? self.dataStore[indexPath!.row] : nil
or explicitly unwrap it (causing a runtime error if indexPath is nil):
cell.textLabel.text = self.dataStore[indexPath!.row]
or use the more verbose if let syntax suggested by @NateCook.