I have this cocoa touch code where you press a button and a NSInteger adds its self with the number 1 and then a label turnes into the NSInteger value
This is the code
- (IBAction)out:(id)sender {
outnum = outnum + 1;
self.outnumberlabel.text = [[NSString alloc] initWithFormat: @"%d", outnum];
Everything works, but the NsInteger is adding 4 when it is ment to add 1
And when I put in
outnum = outnum + 2;
The label turns to 8
It is going up in fours does anybody know why and how to fix it