Xcode调试 - 显示图像 [英] Xcode debugging - displaying images

查看:139
本文介绍了Xcode调试 - 显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢使用Xcode调试器。您可以随时查看变量的值,甚至可以更改它们。



当您测试图像时,问题出现,此处弹出以下问题: / p>

我可以以某种方式显示图像变量引用的图像吗?我知道我可以看到它的原始字节,但如果它会弹出一个包含其内容的窗口,它将会更加人性化。



Xcode可能不支持它。也许有一个外部工具可以帮助吗?

解决方案

使用快速查看来检查图像在Xcode调试器中。



选择一个 UIImage NSImage 在调试器中,然后单击快速查看眼睛图标。





像OS X的其他区域一样,您还可以使用空格键快速查看! p>



快速查看调试器也可以为您自己的类实现:



启用快速查找自定义类型


Xcode调试器中的变量Quick Look功能允许您通过图形呈现来获取对象变量状态的快速可视化评估,显示在调试器变量中的popover窗口中查看或在您的源代码中的位置。



本章介绍如何为自定义类类型实现Quick Look方法,以便也可以呈现这些类型的对象变量在快速浏览窗口中可视化。



I love using Xcode debugger. You can any time take a look at the variable's values, you can even change them.

The problem rises when u are testing images, and here pops up the question:

Can I somehow DISPLAY the image that is referenced by the image variable? I know i can see raw bytes of it, but it would be much more human friendly if that would pop a window with its contents.

Xcode might not support it. Maybe there is an external tool that would help with that?

解决方案

Use Quick Look to inspect images in the Xcode debugger.

Select a UIImage or NSImage in the debugger, then click the Quick Look "eye" icon.

Like other areas of OS X, you can also use spacebar to Quick Look!

Quick Look in the debugger can also be implemented for your own classes:

Enabling Quick Look for Custom Types

The variables Quick Look feature in the Xcode debugger allows you to obtain a quick visual assessment of the state of an object variable through a graphical rendering, displayed in a popover window either in the debugger variables view or in place in your source code.

This chapter describes how you implement a Quick Look method for your custom class types so that object variables of those types can also be rendered visually in the Quick Look popover window.

这篇关于Xcode调试 - 显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆