Developing an iOS application with Xcode ver 9.2, Swift.

After the RightNavigationButtonAdd is tapped, I want to insert a TableViewCell at the beginning of the TableView and focus(becomeFirstResponder) the TextField in it.

When the inserted TableViewCell is visible, it works normally. But, when the inserted TableViewCell is invisible, an error occurred because of cellForRow returns nil.

Could you tell me how?

**Code of RightNavigationButtonAdd action**

```
@objc func RightNavigationButtonAdd(_ sender: UIBarButtonItem) {

    // array is ["aaa", "bbb", "ccc", "ddd", ...]
    array.insert("", at: 0)
    // ttableView is @IBOutlet var ttableView: UITableView!
    // it is set to "No selection during editing"
    ttableView.insertRows(at: [IndexPath(row:0, section:0)], with: .top)

    // when inserted cell is invisible, error occured:
    // "Fatal error: Unexpectedly found nil while unwrapping an Optional value"
    let cell = ttableView.cellForRow(at: IndexPath(row:0, section:0)) as! TableViewCell

    cell.textField.becomeFirstResponder()
    cell.textField.placeholder = "input anything ..."
    ttableView.scrollToRow(at: IndexPath(row:0, section:0), at: .top, animated: true)
}

```

[Screenshot when inserted cell is visible -> it works normally](https://i.stack.imgur.com/chMlX.png)

[Screenshot when inserted cell is invisible -> error occured](https://i.stack.imgur.com/Uq3bw.png)