`
lizhuang
  • 浏览: 887307 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Values of type 'NSInteger' should not be used as format arguments; add an explic

 
阅读更多
Values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead的产生原因

#if __LP64__ || (TARGET_OS_EMBEDDED && !TARGET_OS_IPHONE) || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64
typedef long NSInteger;
#else
typedef int NSInteger;
#endif

因为在64位下,NSInteger被定义为long;
32位下,被定义为int;
所以在64为下:NSString *strUrl = [NSString stringWithFormat:@"%ld", (long)category];
分享到:
评论

相关推荐

    ios开发之项目废弃图片资源清理工具

    `icon_tag_x.png` should not be shown as unused resource, we should ignore them. ## Installation * Download: [TKResourcesCleaner.app.zip]...

    iOS-2048-master

    It may not be a terribly good idea to change the font, add some ads, and submit to Apple, though. #### Contributors * Danqing Liu (me) * [Scott Matthewman](https://github.com/scottmatthewman) * ...

    IOS详细瀑布流

    static const NSInteger XMGDefaultColumnCount = 3; /** 每一列之间的间距 */ static const CGFloat XMGDefaultColumnMargin = 10; /** 每一行之间的间距 */ static const CGFloat XMGDefaultRowMargin = 10; /** ...

    不会说话的汤姆猫

    NSString *format=dict[@"imageFormat"]; NSInteger frames=[dict[@"frames"] integerValue]; NSMutableArray * imageList=[NSMutableArray array]; for (NSInteger i=0; i; i++) { NSString *fileName=...

    iOS统计图表组件XXChartView.zip

    还可通过tintColor设置喜欢的颜色- (instancetype)initWithValues:(NSArray *)values xTittles:(NSArray *)xTittles yTittleCount:(NSInteger)yTittleCount; (instancetype)chartViewWithValues:(NSArray *)...

    C++语言程序设计课后答案

    C++语言程序设计课后答案 清华大学 郑莉

    tom猫游戏源码 iOS

    ios开发的tom,全部素材和源代码,战士... NSString *path = [[NSBundle mainBundle] pathForResource:imageName ofType:nil]; UIImage *image = [UIImage imageWithContentsOfFile:path]; arrayM[i] = image; };

    ios-Swift TableView及上下拉刷新封装.zip

    只需要下面几步就可以完成TableView及上下拉刷新的使用 简单易用(注意:这里只针对单组进行了封装,想要实现多组 重写TableView代理方法即可) 1.继承...override func loadData(page: NSInteger) { }

    简单易用的图片浏览器

    browser.imageType = ImageType_Str;//图片类型 browser.currentIndex = _index;//当前图片索引 //回调block(做你想做的操作) browser.dismissBlock = ^(NSInteger dismissIndex){ _scrollView.contentOffset =...

    ios-仿照微信、微博的弹出action sheet写的一个工具类.zip

    AS_Sheet *a = [[AS_Sheet alloc] initWithFrame:self.view.bounds titleArr:@[@"从手机相册选择", @"拍照", @"小视频"]]; __weak typeof(a) weakA = a; a.Click = ^(NSInteger clickIndex) { switch ...

    LHDTableVIew简单封装

    @property (nonatomic, copy) NSInteger(^tableViewNumberOfRowInSection)(UITableView *,NSInteger); @property (nonatomic, copy) UITableViewCell *(^tableViewCellForRowAtIndexPath)(UITableView *, ...

    NSString-BlockHelper:NSString + BlockHelper

    NSString-BlockHelper NSString + Block... NSInteger loc = word3.indexOf(word2); NSLog(@"%d",loc); //output : 6 NSString *word4 = @"word4"; NSString *word5 = @"word5"; NSLog(@"%@",word3.replace

    15个梨分给5个人的组合算法

    把15个梨分给5个人,每人最少2个,最多5个的组合算法,返回一个数组 - (NSArray *)createRandomArrayForCount:(NSInteger)aCount min:(NSInteger)aMin max:(NSInteger)aMax people:(NSInteger)aPeople

    tag标签总结

    博文链接:https://yousking.iteye.com/blog/65174

    iOS基于ImageMagick的图片压缩<不支持模拟器>

    [[WZMQualityHandle shareHandle] compressImage:path quality:0.5 progress:^(NSString *outPath, CGFloat pro, NSInteger size0, NSInteger size1) { if (pro == 1.0) { NSLog(@"压缩完成,%@", outPath); } ...

    ios-点击图片查看大图.zip

    - (instancetype)initWithAllPhotosArray:(NSArray *)photosArr currentIndex:(NSInteger)currentIndex way:(NSInteger )way; 参数1:photosArr --- 保存URL的数组 @[@"URL1",@"URL2"] 参数2:currentIndex --- ...

    ios-DLCalender.zip

    _calendarView.calendarBlock = ^(NSInteger day, NSInteger month, NSInteger year){ NSString *dateString=[NSString stringWithFormat:@"%lu-%lu-%lu",year,month,day]; }; self.calendarView....

    ios-MCTopView.zip

    -(void)mcShowSelfViewTopView:(NSInteger)style{ MCTopView *topView = [MCTopView mcDefaultMCPickViewController:self setFrame:CGRectMake(0,100, self.view.bounds.size.width, 30)]; [topView ...

    详解 IOS下int long longlong的取值范围

    主要介绍了详解 IOS下int long longlong的取值范围的相关资料,需要的朋友可以参考下

Global site tag (gtag.js) - Google Analytics