首页 > 其他 > 详细

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

时间:2015-02-13 18:19:21      阅读:299      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!