For TableView: cannot implement this fuction:
func isRowSelected(_ row: Int) -> Bool
{
let selected: Bool
return selected
}
Error message: Constant 'selected' used before being initialized
What is wrong?
Thanks
gefa
*** OOPer explained, the message was very explicit.
What value did you expect the func to return ? true ? false ?
func isRowSelected(_ row: Int) -> Bool
{
let selected: Bool
return selected
}
So, you have to keep track somewhere of which row is selected. In an array probably.
Use this array to set the value.
But if you have such an array, why not use it directly, instead of creating another func ?
Shouyld show more code to make it clear.
Don't forget to close all the threads you opened.