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.
Written by Arthur Chang
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ios
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#