I would like to handle 64 bit unsigned integers on a iPhone 4s (which of course has a 32 bit ARM 6 processor).
When trying to work with 64 bit unsigned integers, e.g. Twitter IDs, I have the following problem:
// Array holding the 64 bit integer IDs…
I'm trying to cast a NSUInteger to a string so I can print a message. From searching, it seems like I need to use stringWithFormat, but I am getting an error that an implicit cast not allowed with ARC.
Here's the line in question:
NSString *text =…
Hello I am working on a project and I am trying to add an NSUInteger to an NSMutableArray. I am new to Objective-C and C in general. When I run the app NSLog displays null.
I'd appreciate any help anyone is able to provide.
Here is my…
I have a NSURL delegate method which takes in NSInteger as the parameter
- (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten…
I wrote a method tha uses myarray, defined in the same class. When I use count it always returns 0.
When I use:
printf("%d", [myarray count]);
compiler says:
Format '%d' expetcs type 'int', but argument 2 has type 'NSUInteger'
why?
Why NSNumber of 0 cannot be converted to correct NSInteger/NSUInteger value?
NSUInteger a = [@0 unsignedIntegerValue]; // a become nil
Why is a in the above line of code nil. Shouldn't it be equal to 0?
In the console:
(lldb) po [@0…
I am trying to retrieve my NSIndexSet by calling -getIndexes:maxCount:indexRange
Here is my code
const NSUInteger arrayCount = picturesArray.count;
NSUInteger theIndexBuffer[arrayCount];
[picturesArray getIndexes:theIndexBuffer…
In a sqlite3 database, I've a table "data" with two fields: type and path. The field type is defined as INTEGER. In this field I insert a NSUInteger value (which will be for example 0 or 1). The problem is that, when I retrieve it, I obtain a…
I'm trying to use a HKAnchoredObjectQuery on iOS.
To do so I have to provide an anchor to the query which in this case is a NSUInteger. I want to save this integer for queries in the future in the NSUserDefaults and just simply want to use
if(anchor…
I have a NSUInteger. In the viedDidLoad method I set it so 0 :
@property NSUInteger *unitOne;
//In viewdidload
_unitOne = 0;
This adds one to it. (This is in touchesBegan method. This code only takes place when a UIImageView is clicked. The…
I have an NSUInteger and i want to divide it by 100. So lets say i have the number 1 in an NSUInteger i want to divide it by 100 and get 0.01 as the result.
(float) percent / 100
percent is an NSUInteger
I'm implementing the -hash method on a class, which is supposed to return an NSUInteger. My implementation for it was going to be similar to this:
- (NSUInteger) hash {
return CFHash(self->cfObj);
}
Now, CFHash returns a CFHashCode, which is a…
I have some calculation that involves negative values:
row = (stagePosition - col) / PHNumRow;
Say stagePosition is -7 and col is 1. They are both NSInteger, including row.
PHNumRow is 8.
If PHNumRow is NSInteger, I get the result I expect: -1.
But…