Reputation: 2403
@interface MyObject : NSObject {
NSUInteger myID;
}
@property (nonatomic) NSUInteger myID;
Upvotes: 1
Views: 227
Reputation: 31730
NSUInteger
is unsigned integer and int
is signed integer
Upvotes: 1
Reputation: 12787
NSUInteger is an unsigned integer, and (can be/should be) used in cases where you are not expecting negative values i.e. the index of an array.
NSInteger is typedef for int , and it includes negative values.
Both having different limits
unsigned int is 0 to 4294967295 signed is -268435454 to 268435455 .
Upvotes: 6