八进制格式化输出
NSLog(@"%o",15);
NSLog(@"%#o",15)
输出
2016-04-12 23:36:14.093 MyTest[43037:539029] 17
2016-04-12 23:36:14.094 MyTest[43037:539029] 017
十六进制格式化输出
NSLog(@"%x",15);
NSLog(@"%#x",15);
输出
2016-04-12 23:36:14.094 MyTest[43037:539029] f
2016-04-12 23:36:14.094 MyTest[43037:539029] 0xf
网友评论