swift - Array Name being described as a String -
i have multiple arrays , want choose 1 main array. want main array described string. how can name new array using stationid string , directionid string?
let farbhof1 = ["hi","some","strings"] var stationid = "farbhof" var directionid = "1" destviewcontroller.tableviewarray = "\(stationid)\(directionid)"
you cannot in swift. variable names need known @ compile time, cannot calculated @ runtime.
Comments
Post a Comment