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

NSInteger NSUINteger

 
阅读更多

NSUInteger and NSInteger are different lengths on 32-bit (int) and 64-bit (long). In order for one format specifier to work for both architectures, you must use a long specifier and cast the value to long:

TypeFormatSpecifierCast------------------------NSInteger%ld            longNSUInteger%lu            unsignedlong

So, for example, your code becomes:

[NSString stringWithFormat:@"Total Properties: %lu",(unsignedlong)[inArray count]];
分享到:
评论

相关推荐

    分页效果设置

    - (void)setSelectedIndex:(NSUInteger)selectedIndex; @end typedef NS_ENUM(NSInteger, MSegmentedControlIndicatorStyle){ MSegmentedControlIndicatorStyleDefault }; typedef NS_ENUM(NSInteger, ...

    AZFMDB:您可以快速方便地使用sqllite开发您的应用程序

    AZFMDB u can fast and convenient use sqllite to develop ...* 支持 bool, int, float, NSInteger, NSUInteger, CGFloat, NSTimeInterval, @"NSNumber",@"NSDictionary",@"NSMutableDictionary",@"NSArray",@"NSMuta

    IOS详细瀑布流

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

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

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

    LHDTableVIew简单封装

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

    不会说话的汤姆猫

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

    ios-DLCalender.zip

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

    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 --- ...

    Object-c字符串数组字典

    字符串、数组、字典、集 合以及快速OC语言中的字符串是NSString 初始化 -(id) initWithString:(NSString *)str; -(id) initWithFormat:(NSString *)format... ...-(unichar) characterAtIndex:(NSUInteger) index

    ios-MCTopView.zip

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

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

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

    iOS统计图表组件XXChartView.zip

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

    仿网易自动循环广告,也可手动滑动

    self adView fetchContentViewAtIndex ^UIView NSInteger pageIndex { return viewsArray[pageIndex]; }; self adView totalPagesCount ^NSInteger void { return [viewsArray count]; }; self adView ...

    ios-UITextField,UITextView限制输入长度和类型.zip

    typedef NS_ENUM(NSInteger, XLFTextLimitType) { XLFTextLimitTypeNone, // 无限制 XLFTextLimitTypeByte, // 字节数限制 XLFTextLimitTypeLength, // 字符个数限制 }; typedef NS_ENUM(NSInteger, ...

    iOS search

    -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ if (tableView == self.searchDisplayController.searchResultsTableView) { return [self.searchList count]; }...

    ios-封装系统的alert--好用的alert.zip

    [LTAlertView showTitle:@"LTAlert" message:@"我是普通alert" ButtonTitles:@[@"确认",@"取消"] OnTapBlock:^(LTAlertView* alert,NSInteger num) { NSLog(@"点击了第%d个按钮",num); }]; break; case 1: ...

    ios-时间选择器.zip

    typedef NS_ENUM(NSInteger, UIMinutesType) { UIMinutesTypeAll = 0, //60秒,每一秒一个数值 UIMinutesTypeHalfHour, //半分钟一个数值 00 30 UIMinutesTypeQuarterHour //15秒一个数值 00 15 30 45 }; 修改...

    ios-仿网易新闻.zip

    NSInteger idx = offsetX / self.view.width;// 浮点索引 CGFloat idx_float = offsetX / self.view.width;// 整形索引 CGFloat percent = idx_float - idx;// 百分比 NSInteger left_idx = idx;// 左边...

Global site tag (gtag.js) - Google Analytics