Skip to content

Instantly share code, notes, and snippets.

@pbrewczynski
Created January 18, 2014 19:24
Show Gist options
  • Save pbrewczynski/8494986 to your computer and use it in GitHub Desktop.
Save pbrewczynski/8494986 to your computer and use it in GitHub Desktop.
- (IBAction)historyUISliderValueChanged:(id)sender {
float sliderValue = ((UISlider *)sender).value;
NSUInteger sizeOfHistory = self.game.historyOfActions.count;
NSUInteger index = floor(sliderValue * sizeOfHistory);
NSLog(@"index %d" ,index);
NSLog(@"%@ index: %d ", self.game.historyOfActions[index], index); // Problem when historyOfActions is empty!
//NSLog(@"Value : %f self.game.lastActionDescription %@ ", ((UISlider *)sender).value,
// self.game.historyOfActions);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment