nsinteger
When to use NSInteger vs. int
When should I be using NSInteger vs. int when developing for iOS?I see in the Apple sample code they use NSInteger (or NSUInteger) when passing a value as an argument to a function or returning a valu[详细]
2023-01-31 03:47 分类:问答NSLog/printf specifier for NSInteger?
A NSInteger is 32 bits on 32-bit platforms, and 64 bits on 64-bit platforms. Is there a NSLog specifier that always matches the size of NSInteger?[详细]
2023-01-29 15:00 分类:问答Does NSUserDefault take a few seconds to register the values I pass it?
I am passing an integer value to the NSUserDefault object to store for use when my app loads up. I HAD it working perfectly until I tried to switch that integer value to a float. It caused a whole bun[详细]
2023-01-26 14:45 分类:问答Objective-C handling integer values
I am getting confused with how to handle Integers in Objective C. If I define the following: NSInteger i = 6;[详细]
2023-01-20 12:23 分类:问答How can I reverse the byte order of an NSInteger or NSUInteger in objective-c
This is a somewhat of a follow up to this posting but with a different question so I felt I should ask in a separate thread.[详细]
2023-01-18 18:04 分类:问答Objective-C can't assign a NSInteger to an NSInteger variable?
This is going开发者_开发百科 to seem like a really silly question but I can\'t figure out why I\'m getting an error.[详细]
2023-01-11 20:52 分类:问答Crazy problem when comparing NSInteger to int
I have a crazy problem when comparing an NSInteger to int, as follows: NSInteger count = [dictionary count];[详细]
2023-01-08 08:51 分类:问答Initializing NSArray and adding an NSInteger to it
I am having problems initalizing an NSArray and adding integers to it. Here is my code, which I commented in what I am trying to accomplish. My app crashes when adding an object, but I don\'t know, if[详细]
2023-01-06 07:04 分类:问答Check if Integer is Positive or Negative - Objective C
How can I tell in objec开发者_如何转开发tive-c coding if an integer is positive or negative. I\'m doing this so that I can write an \"if\" statement stating that if this integer is positive then do th[详细]
2023-01-03 17:05 分类:问答Incorrect value for sum of two NSIntegers
I\'m sure I\'m missing something and the answer is very simple, but I can\'t seem to understand why this is happening. I\'m trying to make an average of dates:[详细]
2023-01-01 06:15 分类:问答