I want to display an array managed by Actor in UITableView

58 views Asked by At

I have an actor like this

actor DataSource {
    var array = ["1"]
}

I would like to display this array in a table

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    dataSource.array.count
}

If you access it from within Task, an error will occur. Is it not possible to display arrays managed by actors in a table?

0

There are 0 answers