Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swift reload view

let queue = DispatchQueue(label: "com.lozzoc")
var backgroundTask = DispatchWorkItem {
	var data = try? Data() ?? Data()
}
var updateUITask = DispatchWorkItem {
	self.tableView.reloadData()
}

backgroundTask.notify(queue: DispatchQueue.main,
						execute: updateUITask)
                        
queue.async(execute: backgroundTask)
            
 
PREVIOUS NEXT
Tagged: #swift #reload #view
ADD COMMENT
Topic
Name
3+7 =