2013-02-20 67 views
-2

我是iOS編程新手 我想將選中的Cell (cell.detailTextLabel.text)另存爲Textfield以外的表格視圖在同一個viewController。 任何人都可以告訴我如何?UI單元格的選定索引

+0

great..what你有試過嗎? – 2013-02-20 14:14:46

回答

0

使用表格視圖此委託方法,

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

聲明變量名selectedLabelName在你的ViewController

相關問題