I´ve question regarding parallel processing of an image with an loading overlay. I´m processing an image in a function which needs some seconds. During that time a loading overlay should be shown.
The problem is, that the loading overlay appears AFTER the image is processed although it´s called BEFORE the image is processed.
@IBAction func onFilterRed(sender: UIButton) {
LoadingOverlay.shared.showOverlay(self.view)
var rgbaImage = RGBAImage(image: self.originalImage!)
rgbaImage?.adjustColor(red: 80, green: -30, blue: -30)
self.filteredImage = rgbaImage?.toUIImage()
imageView.image = self.filteredImage
}
I´ve no idea why the overlay isn´t shown at the point where it´s called.
Thanks for any hint, Michael