В быстром доступе есть предварительное условие для доступа к строке indexpath
/// The section of this index path, when used with `UITableView`.
///
/// - precondition: The index path must have exactly two elements.
public var section: Int
/// The row of this index path, when used with `UITableView`.
///
/// - precondition: The index path must have exactly two elements.
public var row: Int
![enter image description here](https://i.stack.imgur.com/WRkRH.jpg)
Если вы хотите получить доступ или изменить строку, вам нужно для инициализации indexPath строкой и разделом
var foo: IndexPath
foo = IndexPath(row: 0, section: 0)
foo.row = 1 // return foo (1,0)