Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/117.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 用户界面单元的选定索引_Ios_Objective C - Fatal编程技术网

Ios 用户界面单元的选定索引

Ios 用户界面单元的选定索引,ios,objective-c,Ios,Objective C,我不熟悉iOS编程 我想将所选的单元格(Cell.detailTextLabel.text)保存到同一viewController的表视图外部的另一个Textfield。 有人能告诉我怎么做吗?使用表视图的委托方法 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView cellForRo

我不熟悉iOS编程 我想将所选的
单元格(Cell.detailTextLabel.text)
保存到同一
viewController
的表视图外部的另一个
Textfield

有人能告诉我怎么做吗?

使用表视图的委托方法

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

在viewcontroller中声明变量名selectedLabelName

great..您尝试了什么?