gpt4 book ai didi

objective-c - 在 NSObject 的子类上实现什么方法以允许在 swift playground 中进行 pretty-print ?

转载 作者:搜寻专家 更新时间:2023-11-01 05:38:14 27 4
gpt4 key购买 nike

有没有办法在 Xcode 7.2 swift playground 中漂亮地打印自定义 objective-c 对象?比如,我有一些 objective-c 类,想实现 pretty-print 支持所需的协议(protocol) ...

任何指点将不胜感激!

最佳答案

我还没有测试过,但我认为它与这个关于重写 NSObject 的 description 和/或 descriptionWithLocale:indent: 方法的问题类似。

NSDictionary-like pretty-print in the debugger (or log)

关于objective-c - 在 NSObject 的子类上实现什么方法以允许在 swift playground 中进行 pretty-print ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34347723/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com