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]];

猜你喜欢

转载自lizhuang.iteye.com/blog/2096881