Search code examples
arraysswifttableviewbackendless

Swift: Return Backendless to table


Im having a problem on putting my received data(from backendless) to a tableview. As you can see on the image i have get data from Backendless and i have checked the data with print and it works. Now i want to put the data to my tableView, but it does not work as you usually do with making an array in the beginning and then just put return.Sub.count.

Any idea how to do it?

My code


Solution

  • You should declare

    var Sub  = [String]()
    

    underneath your tableView class declaration (At the very top)

    Then, in your function,

    fetchingAllUsers() 
    

    delete the "var" keyword, and you should be fine.

    Also, it'd help if you posted all of your code if you need me to be more specific.