equal
deleted
inserted
replaced
60 // the preview for static maps is loaded in didSelectRowAtIndexPath |
60 // the preview for static maps is loaded in didSelectRowAtIndexPath |
61 } |
61 } |
62 [seed release]; |
62 [seed release]; |
63 |
63 |
64 // perform as if user clicked on an entry |
64 // perform as if user clicked on an entry |
65 NSIndexPath *theIndex = [NSIndexPath indexPathForRow:(random()%[source count]) inSection:0]; |
65 NSIndexPath *theIndex = [NSIndexPath indexPathForRow:arc4random_uniform((int)[source count]) inSection:0]; |
66 [self tableView:self.tableView didSelectRowAtIndexPath:theIndex]; |
66 [self tableView:self.tableView didSelectRowAtIndexPath:theIndex]; |
67 if (IS_NOT_POWERFUL([HWUtils modelType]) == NO) |
67 if (IS_NOT_POWERFUL([HWUtils modelType]) == NO) |
68 [self.tableView scrollToRowAtIndexPath:theIndex atScrollPosition:UITableViewScrollPositionMiddle animated:YES]; |
68 [self.tableView scrollToRowAtIndexPath:theIndex atScrollPosition:UITableViewScrollPositionMiddle animated:YES]; |
69 } |
69 } |
70 |
70 |
401 return dataSourceArray; |
401 return dataSourceArray; |
402 } |
402 } |
403 |
403 |
404 -(void) viewDidLoad { |
404 -(void) viewDidLoad { |
405 [super viewDidLoad]; |
405 [super viewDidLoad]; |
406 srandom(time(NULL)); |
|
407 |
406 |
408 // initialize some "default" values |
407 // initialize some "default" values |
409 self.slider.value = 0.05f; |
408 self.slider.value = 0.05f; |
410 self.slider.enabled = NO; |
409 self.slider.enabled = NO; |
411 self.oldValue = 5; |
410 self.oldValue = 5; |