Tipo de accesorio UITableViewCell marcado en Tocar y configurar otro no seleccionado

Estoy un poco confundido acerca de la configuración de accesorios de la celda de vista de tabla.

He arreglado dos secciones en mi mesa.

CasaOficina

Lo que quiero es como seguir ...

Cuando el usuario toca cualquiera de las celdasLa celda se selecciona yQuiero configurar el marcado (configurar el tipo de accesorio uitableviewcell -checked of tapped cell)Y también todo el tipo de accesorio de la otra celda ahora debería configurarse enTipo de accesorio de celda de visualización adecuada ninguno

He intentado seguir el código. Pero encontré que indexpath.row & indexpath.section son propiedades de solo lectura.

// Override to support row selection in the table view.
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {    
    [tblProfileView deselectRowAtIndexPath:indexPath animated:YES];
    int i,max;
    UITableViewCell *x; NSIndexPath *tt;

    for(i=0;i<[tblProfileView numberOfRowsInSection:0];i++)
    {
        tt.row=i; tt.section=0;
        x=[tblProfileView cellForRowAtIndexPath:];
        [x setAccessoryType:UITableViewCellAccessoryNone];
    }
    for(i=0;i<[tblProfileView numberOfRowsInSection:1];i++)
    {
        tt.row=i; tt.section=1;
        x=[tblProfileView cellForRowAtIndexPath:tt];
        [x setAccessoryType:UITableViewCellAccessoryNone];
    }

    x=[tblProfileView cellForRowAtIndexPath:indexPath];
    [x setAccessoryType:UITableViewCellAccessoryCheckmark];
    // Navigation logic may go here -- for example, create and push another view controller.
    // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil];
    // [self.navigationController pushViewController:anotherViewController animated:YES];
    // [anotherViewController release];
}

Respuestas a la pregunta(9)

Su respuesta a la pregunta