equal
deleted
inserted
replaced
79 NSString *fileName = [[NSString alloc] initWithFormat:@"Scheme %u.plist", [self.listOfSchemes count]]; |
79 NSString *fileName = [[NSString alloc] initWithFormat:@"Scheme %u.plist", [self.listOfSchemes count]]; |
80 |
80 |
81 createSchemeNamed([fileName stringByDeletingPathExtension]); |
81 createSchemeNamed([fileName stringByDeletingPathExtension]); |
82 |
82 |
83 [self.listOfSchemes addObject:fileName]; |
83 [self.listOfSchemes addObject:fileName]; |
84 [fileName release]; |
|
85 |
84 |
86 // order the array alphabetically, so schemes will keep their position |
85 // order the array alphabetically, so schemes will keep their position |
87 [self.listOfSchemes sortUsingSelector:@selector(compare:)]; |
86 [self.listOfSchemes sortUsingSelector:@selector(compare:)]; |
|
87 [self.tableView reloadData]; |
88 |
88 |
89 [self.tableView reloadData]; |
89 NSInteger index = [self.listOfSchemes indexOfObject:fileName]; |
|
90 [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0] atScrollPosition:UITableViewScrollPositionMiddle animated:YES]; |
|
91 [fileName release]; |
90 } |
92 } |
91 |
93 |
92 #pragma mark - |
94 #pragma mark - |
93 #pragma mark Table view data source |
95 #pragma mark Table view data source |
94 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { |
96 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { |