UITableViewCell Tipo de acessório marcado em tocar e definir outro desmarcado

Estou confuso um pouco sobre acessórios de célula de exibição de tabela de configurações.

Eu fixei duas seções na minha mesa

CasaEscritório

O que eu quero é o seguinte ....

Quando o usuário toca em qualquer célulaCélula é selecionada eEu quero definir marcada (set uitableviewcell tipo de acessório -checked de celular tocado)E também todos os tipos de acessórios de outras células agora devemtipo de acessório de visualização uitable type none

Eu tentei seguir o código. Mas eu achei que indexpath.row & indexpath.section é propriedades readonly.

// 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];
}

questionAnswers(9)

yourAnswerToTheQuestion