NSLog

作者: Coder大雄 | 来源:发表于2016-09-04 21:11 被阅读13次
Macro Format Specifier Description
__func__ %s Current function signature
__LINE__ %d Current line number in the source code file.
__FILE__ %s Full path to the source code file.

__func__打印的是当前方法用在那个函数里面
__LINE__打印当前代码在文件中的行号
__FILE__打印当前文件的路径 。(注意)NSLog打印C语言字符串的时候不能有中文,所以如果项目里面有中文,打印的时候就不能用NSLog,使用printf

相关文章

网友评论

      本文标题:NSLog

      本文链接:https://www.haomeiwen.com/subject/phalettx.html