CFShow 打印核心基础对象的内容



~/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleiOS8.1.iOSLibrary.docset/Contents/Resources/Documents/documentation/CoreFoundation/Reference/CFTypeRef/index.html



CFShow
Prints a description of a Core Foundation object to stderr.

Declaration
SWIFT
func CFShow(_ obj: AnyObject!)
OBJECTIVE-C
void CFShow ( CFTypeRef obj );
Parameters
obj    
A Core Foundation object derived from CFType. If obj is not a Core Foundation object, an assertion is raised.
Discussion
The output is printed to the standard I/O standard error (stderr).

This function is useful as a debugging aid for Core Foundation objects. Because these objects are based on opaque types, it is difficult to examine their contents directly. However, the opaque types implement description function callbacks that return descriptions of their objects. This function invokes these callbacks.

Special Considerations
You can use CFShow in one of two general ways. If your debugger supports function calls (such as gdb does), call CFShow in the debugger:

(gdb) call (void) CFShow(string)
Hello World
You can also incorporate calls to CFShow in a test version of your code to print out "snapshots" of Core Foundation objects to the console.

Import Statement
import CoreFoundation

Availability
Available in iOS 2.0 and later.




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值