I need this block of code to run in order:
UIApplication.shared.beginIgnoringInteractionEvents()
loadDataTask.resume()
UIApplication.shared.endIgnoringInteractionEvents()
It's being run inside of DispatchQueue.main.async()
(every network call is that's why I'm trying to temporarily block user input). I am still learning swift and struggling a little with the GCD concept. Any recommendations would be very much appreciated.