UIImage in Xcode quick look: must be unwrapped

Posted on

Using Xcode to debug has been fantastic, and frustrating at the same time.

UIImage objects are often great to look at while debugging using the Xcode Quick Look functionality. But I always wondered why many of them just didn’t show the image.

After digging in a bit, I realized that the UIImage objects that I was able to quick look were all unwrapped.

let image = getUIImage() // no quick look
let unwrapped = image! // quick look available

So as a bit of debugging code, just unwrap it to take a peek.

Leave a Reply

Your email address will not be published.