My very simple program is looping through an array to export several files. While it\'s in the loop, I\'d like it to update a text field to tell the user which file is curre
This workt for me on Swift 4
DispatchQueue.global(qos: .default).async {
for item in filesArray {
var fileName = item["fileName"]
// Update the text field on the main queue
DispatchQueue.main.async {
fileNameExportLabel.stringValue = "Exporting \(fileName).ext"
}
print("Exporting \(fileName).ext")
//--code to save the stuff goes here--
}
}