If you’ve tried to create a UIImage instance from data fetched over the network, you know the errors that could come up. To easily verify if your image has been initialised correctly, you can use this simple tip.

  • Set a breakpoint one line after you’ve initialised your UIImage object.

  • When the control halts at that line, hover over your UIImage object, and you should see a popover like this:

  • Click on the eye icon beside the “i” icon, and you’ll see a quicklook popover that should contain your image. (If everything is done right.)

As you can imagine, this is a much better debugging technique than creating a temporary UIImageView just to show the image. (Unless of course, you need the UIImageView in your app.)

(Screenshots from Pinterest’s “Pin It” demo project.)