Does anyone know why `section` and `row` are vals ...
# kotlin-native
k
Does anyone know why
section
and
row
are vals on
NSIndexPath
? They are vars in Swift, and since they're vals in the native bindings, there's no way to set them.
ah, damn, there's
NSIndexPath.indexPathForRow
!
e
IIRC they’re read-only in Obj-C. I think Swift uses a
struct
for
IndexPath
so they’re not mutable. In either case you can only set them with either an initializer or a factory method
(I think the thing you found is the obj-c factory method)