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 UIImageView
animates downwards in a loop.)
_unitOne++;
NSLog(@"%lu", (unsigned long) _unitOne);
When unitOne
is supposed to equal 1, the debugger always says it's 8. When it need to equal 2, it is 16, and so on. Any ideas?
Note: If anyone needs more code, just tell me where you think it's going wrong and I'll add it.