如何在 Xcode 中将某些内容打印到控制台? [英] How to print something to the console in Xcode?

查看:126
本文介绍了如何在 Xcode 中将某些内容打印到控制台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何向Xcode的控制台打印一些东西,是否可以从应用程序本身查看Xcode控制台?

How do you print something to the console of Xcode, and is it possible to view the Xcode console from the app itself?

谢谢!

推荐答案

@Logan 已经完美地解决了这个问题.可能值得指出的一点是,您可以使用

@Logan has put this perfectly. Potentially something worth pointing out also is that you can use

printf(whatever you want to print);

例如,如果您正在打印一个字符串:

For example if you were printing a string:

printf("hello");

这篇关于如何在 Xcode 中将某些内容打印到控制台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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