I have been trying to check whether an NSInteger is odd or even. I have found a way to do it using C but it doesn't work with Objective-C. How would I do this?
NSInteger is defined as
long on some environments). So checking on oddity is like for plain int:
NSInteger num; if (num % 2) // odd else // even