project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m
changeset 3523 6592fbb969da
parent 3522 156c04c6a3d8
child 3546 ccf4854df294
equal deleted inserted replaced
3522:156c04c6a3d8 3523:6592fbb969da
   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 
   119 #pragma mark -
   127 #pragma mark -
   120 #pragma mark Table view delegate
   128 #pragma mark Table view delegate
   121 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
   129 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
   122     if (childController == nil) {
   130     if (childController == nil) {
   123         childController = [[SingleSchemeViewController alloc] initWithStyle:UITableViewStyleGrouped];
   131         childController = [[SingleSchemeViewController alloc] initWithStyle:UITableViewStyleGrouped];