equal
deleted
inserted
replaced
89 NSString *newFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),newSaveName]; |
89 NSString *newFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),newSaveName]; |
90 [[NSFileManager defaultManager] copyItemAtPath:currentFilePath toPath:newFilePath error:nil]; |
90 [[NSFileManager defaultManager] copyItemAtPath:currentFilePath toPath:newFilePath error:nil]; |
91 [self.listOfSavegames addObject:newSaveName]; |
91 [self.listOfSavegames addObject:newSaveName]; |
92 [self.listOfSavegames sortUsingSelector:@selector(compare:)]; |
92 [self.listOfSavegames sortUsingSelector:@selector(compare:)]; |
93 |
93 |
94 //[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:[self.listOfSavegames indexOfObject:newSaveName] inSection:0]] withRowAnimation:UITableViewRowAnimationFade]; |
|
95 [self.tableView reloadData]; |
94 [self.tableView reloadData]; |
96 } |
95 } |
97 |
96 |
98 -(IBAction) clearAll:(id) sender { |
97 -(IBAction) clearAll:(id) sender { |
99 NSString *titleStr, *cancelStr, *confirmStr; |
98 NSString *titleStr, *cancelStr, *confirmStr; |
223 statsPage.modalTransitionStyle = UIModalTransitionStyleCoverVertical; |
222 statsPage.modalTransitionStyle = UIModalTransitionStyleCoverVertical; |
224 if ([statsPage respondsToSelector:@selector(setModalPresentationStyle:)]) |
223 if ([statsPage respondsToSelector:@selector(setModalPresentationStyle:)]) |
225 statsPage.modalPresentationStyle = UIModalPresentationPageSheet; |
224 statsPage.modalPresentationStyle = UIModalPresentationPageSheet; |
226 [self presentModalViewController:statsPage animated:NO]; |
225 [self presentModalViewController:statsPage animated:NO]; |
227 |
226 |
|
227 // also modify GameConfigViewController.m |
228 NSArray *stats = [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary]; |
228 NSArray *stats = [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary]; |
229 if ([stats count] == 0) { |
229 if ([stats count] <= 1) { |
|
230 DLog(@"%@",stats); |
230 [statsPage dismissModalViewControllerAnimated:NO]; |
231 [statsPage dismissModalViewControllerAnimated:NO]; |
231 } else { |
232 } else { |
232 statsPage.statsArray = stats; |
233 statsPage.statsArray = stats; |
233 [statsPage.tableView reloadData]; |
234 [statsPage.tableView reloadData]; |
234 [statsPage viewWillAppear:YES]; |
235 [statsPage viewWillAppear:YES]; |