project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.m
changeset 3523 6592fbb969da
parent 3522 156c04c6a3d8
child 3546 ccf4854df294
equal deleted inserted replaced
3522:156c04c6a3d8 3523:6592fbb969da
   113     
   113     
   114     [self.listOfWeapons removeObjectAtIndex:row];
   114     [self.listOfWeapons removeObjectAtIndex:row];
   115     [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
   115     [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
   116 }
   116 }
   117 
   117 
       
   118 -(BOOL) tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
       
   119     UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
       
   120     if (![cell.textLabel.text isEqualToString:@"Default"]) 
       
   121         return YES;
       
   122     else
       
   123         return NO;
       
   124 }
       
   125 
   118 #pragma mark -
   126 #pragma mark -
   119 #pragma mark Table view delegate
   127 #pragma mark Table view delegate
   120 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
   128 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
   121     if (childController == nil) {
   129     if (childController == nil) {
   122         childController = [[SingleWeaponViewController alloc] initWithStyle:UITableViewStyleGrouped];
   130         childController = [[SingleWeaponViewController alloc] initWithStyle:UITableViewStyleGrouped];