project_files/HedgewarsMobile/Classes/MissionTrainingViewController.m
branchios-revival
changeset 11206 2e80c9861818
parent 11119 f08d5bb1d2b0
child 11218 08f20ffa5801
equal deleted inserted replaced
11205:9fd7b8d3cf4d 11206:2e80c9861818
    52     self.descriptionLabel.textColor = [UIColor lightYellowColor];
    52     self.descriptionLabel.textColor = [UIColor lightYellowColor];
    53     [super viewDidLoad];
    53     [super viewDidLoad];
    54 }
    54 }
    55 
    55 
    56 -(void) viewWillAppear:(BOOL)animated {
    56 -(void) viewWillAppear:(BOOL)animated {
    57     NSIndexPath *indexPath = [NSIndexPath indexPathForRow:random()%[self.listOfMissions count] inSection:0];
    57     NSIndexPath *indexPath = [NSIndexPath indexPathForRow:arc4random_uniform((int)[self.listOfMissions count]) inSection:0];
    58     [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
    58     [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
    59     [self tableView:self.tableView didSelectRowAtIndexPath:indexPath];
    59     [self tableView:self.tableView didSelectRowAtIndexPath:indexPath];
    60     [super viewWillAppear:animated];
    60     [super viewWillAppear:animated];
    61 }
    61 }
    62 
    62