Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何编写 NSLog 语句
pageCache.dataSource = value;
调试它。
在调试中发现
dataSource = (objc_object*) 0x000000 isa(objc_class*)
谢谢
这意味着您的 dataSource 是nil(即那里什么都没有,指针不指向任何东西)。这可能是您尝试调试的任何原因。确保您正确分配和初始化数据源,或在尝试使用它之前正确设置其指针值。
nil
将对象打印到控制台的 NSLog 语句是这样的
NSLog(@"%@", pageCache.dataSource);