I am programmatically presenting a view controller and I am changing the value of a string array with a string array value stored in my SQL (gameGAMETABLEDATA). I am stuck on this error "Cannot assign a value of type 'String' to value of type [String]". I am not sure why this is happening. When I println(gameGAMETABLEDATA[index]), I get a string array, but swift is telling me that it is not a string array. Any help would be greatly appreciated.
var gameGAMETABLEDATA: [String] = []
override func viewDidLoad() {
super.viewDidLoad()
let index = indexPath.row
//Error below!!! "Cannot assign a value of type 'String' to value of type [String]"
GameViewController.tableData = gameGAMETABLEDATA[index]
}
println(gameGAMETABLEDATA)[index] returns:
[cricket3.png, cricket1.png, cricket1.png, cricket1.png, cricket1.png, cricket1.png, cricket1.png]
resultController.tableData = gameGAMETABLEDATA[index]or describe moreOnePlayerCricketclass code to question