Post

Replies

Boosts

Views

Activity

Reply to This method should not be called on the main thread as it may lead to UI unresponsiveness.
I had the same message but with a different code. My code was: for item in items { guard let nsImage = NSImage(data: item) else { continue }   images.append(Image(nsImage: nsImage)) } I resolved the message error with this: DispatchQueue.global(gps: .background).async { for item in items { guard let nsImage = NSImage(data: item) else { continue }   images.append(Image(nsImage: nsImage)) } } Hope this helps to everybody.
Mar ’23