nsinteger

Objective-C can't assign a NSInteger to an NSInteger variable!?

Hey everyone, This is going to seem like a really silly question but I can't figure out why I'm getting an error. I have an instance variable declared as: NSInteger *scopeSelected; I'm using this variable to keep track of what scope has been selected in a UISearchDisplay controller using: - (BOOL)searchDisplayController:(UISearchDi...

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 (http://stackoverflow.com/questions/2718712/how-to-convert-byte-value-into-int-in-objective-c) but with a different question so I felt I should ask in a separate thread. I am at the point where I have four consecutive bytes in memory that I have read in from a file. I'd like to store ...

NSInteger to NSArray iPhone

I have NSInteger variable, for example NSInteger example=1256 and i need an array with elements of this variable. so first element of array is array[0] = 1 array[1] = 2 array[2] = 5 etc.. what way can i solve it ? ...

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; NSLog(@"%d", i); I expect it to print 6 to the console. however I have an NSInteger within an object which is obviously reference by a pointer so I get very difference results. For example: @interface Section : NSObject { ...