Ahsan Ahsan - 4 months ago 24x
Objective-C Question

How to compare two NSInteger?

How do we compare two NSInteger numbers ? I have two NSIntegers and comparing them the regular way wasnt working.

if (NSIntegerNumber1 >= NSIntegerNumber2) {
//do something

Eventhough, the first value was 13 and the second value was 17, the if loop is executing

Any idea ?

NSInteger int1;
NSInteger int2;

int1 = 13;
int2 = 17;

if (int1 > int2)