project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m
changeset 3548 4d220ee7c75f
parent 3547 02875b1145b7
child 3659 f8d5ac50e307
equal deleted inserted replaced
3547:02875b1145b7 3548:4d220ee7c75f
   114     
   114     
   115     [self.listOfSchemes removeObjectAtIndex:row];
   115     [self.listOfSchemes removeObjectAtIndex:row];
   116     [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
   116     [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
   117 }
   117 }
   118 
   118 
   119 -(BOOL) tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
       
   120     UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
       
   121     if (![cell.textLabel.text isEqualToString:@"Default"]) 
       
   122         return YES;
       
   123     else
       
   124         return NO;
       
   125 }
       
   126 
       
   127 #pragma mark -
   119 #pragma mark -
   128 #pragma mark Table view delegate
   120 #pragma mark Table view delegate
   129 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
   121 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
   130     if (childController == nil) {
   122     if (childController == nil) {
   131         childController = [[SingleSchemeViewController alloc] initWithStyle:UITableViewStyleGrouped];
   123         childController = [[SingleSchemeViewController alloc] initWithStyle:UITableViewStyleGrouped];