Skip to content
RED SAGSkills
medium10 pts · first answer countsswift-concurrencyuikit

Updating UI from a detached task

What is wrong with this UIKit code?

func refresh() {
  Task.detached {
    let items = await self.api.fetchItems()
    self.items = items
    self.tableView.reloadData()
  }
}
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions