2013-02-20 4 views
-2

저는 iOS 프로그래밍을 처음 사용했습니다 선택 Cell (cell.detailTextLabel.text)을 의 테이블보기 밖에있는 다른 Textfield에 저장하고 싶습니다. 아무도 나에게 어떻게 제안 할 수 있습니까?UI 셀의 선택된 색인

+0

을 시도 great..what? –

답변

0

를 사용하여 테이블보기의 대리자 메서드,

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; 
    selectedLabelName = cell.textLabel.text; 
} 

당신의 ViewController에 변수 이름 selectedLabelName를 선언하면

관련 문제