码迷,mamicode.com
首页 > 其他好文 > 详细

values of type NSInteger should not be used as format arguments; 关于Xcode中烦人的32位与64位警告处理方法.

时间:2015-02-13 18:21:55      阅读:542      评论:0      收藏:0      [点我收藏+]

标签:

http://stackoverflow.com/questions/16075559/why-does-an-nsinteger-variable-have-to-be-casted-to-long-when-used-as-a-format-a

 

 

老老实实按Xcode的提示来处理

添加ld%,  添加(long)

这样才能保证在32位和64位上都不会出现警告.

 

技术分享

[NSString stringWithFormat:@"%ld", (long)_filterIndex]

  

values of type NSInteger should not be used as format arguments; 关于Xcode中烦人的32位与64位警告处理方法.

标签:

原文地址:http://www.cnblogs.com/willbin/p/4290643.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!