NSLog中的%@

  There is one additional substitution token available in Objective-C, %@, used to denote an object. At runtime, this specifier will be substituted with the result of calling either the descriptionWithLocale: method (if it exists) or the description method on the provided object. The description method is implemented by NSObject to return the class and memory address of the object, but many Cocoa and Cocoa Touch classes override it to provide more useful information. In the case of NSString, the description method simply returns the string of characters that it represents.

  NSLog与printf相比,添加了%@这么一个输出格式,%@对应的对象在编译后会被替换为对descriptionWithLocal方法的调用,如果此方法不存在,则替换为description方法的调用 。

最新文章

  1. 期许伟大-基于CMMI的过程改进之道探索
  2. cocoaPod的使用
  3. CSS浮动属性Float介绍
  4. 解决 Cannot find OpenSSL's <evp.h>
  5. WordPress主题制作函数
  6. laravel事务小例子
  7. JAVA中集合输出的四种方式
  8. [SQL]sql语句中charindex的用法
  9. SendMail
  10. 检测CPU是否支持虚拟化
  11. spring schema自定义
  12. 图片转换成Base64编码集成到html文件
  13. 用SSE指令计算点乘和累加
  14. Zookeeper(一) —— 环境搭建
  15. 基于Web的漏洞利用
  16. Zabbix安装部署(CentOS系统下)
  17. 【总结】 Lucas定理
  18. python猜数字(多种实现方法)
  19. 6/2 sprint2 看板和燃尽图的更新
  20. 再谈zabbix 邮件通知配置(不用脚本,简单配置就可以了)

热门文章

  1. tc srm 636 div2 500
  2. UIView的user Interaction Enabled属性
  3. Linux VPS 基本命令
  4. nodejs模拟http-post文件的方法示例
  5. 为什么Jquery对input file控件的onchange事件只生效一次
  6. 已经被cocos2dx给折腾的想要放弃它,专注Unity3D的怀抱了!
  7. ORACLE TM锁
  8. JS判断是不是本页面并且,给标签添加属性和属性值
  9. linux 如何让程序在开机时启动,关机前关闭
  10. 网站压力测试工具-Webbench源码笔记