Last Updated: February 25, 2016
·
812
· artchang

UIImage in Xcode quick look: must be unwrapped

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.