I'm using revmob to display ads in my app. I used to have it so that everytime the stop button for my timer was pressed, an ad would show. I want to make it so that it shows less. For example, the user press the button once, nothing happens. The second time, the ad shows up. So 1 out of 2 times, the ad shows up. 2 out of 4 times, the ad shows up, etc.
Code i'm using to launch the ad:
- (IBAction)Stop {
[timer invalidate];
if (self.fullscreen) [self.fullscreen showAd];
}
I just want a way to count how many time the stop button has been pressed and after every 2 times, show an ad =) Thanks in advance.