I have been struggling to select a row programmatically in a TableView. I want to select the second row when the window shows.
What I can get from the documentation is that to select a row you can use the Tableview.selectRow(indexPath,animated,ScrollPosition)
so I have the following code in the Window's DidShow event:
var secRow = TableView1.indexPathForRowAtPoint(Point(1,0)); Console.write("index Path = \(secRow)"); TableView1.selectRow(secRow, true, 0); //Gives me an error because secRow is null
var secRow is always null
I have tried to change the Point(0,1) but same result.
Please Advise
I am attaching project if that helps.