Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/113.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
Objective c iOS:UITableView澄清_Objective C_Ios - Fatal编程技术网

Objective c iOS:UITableView澄清

Objective c iOS:UITableView澄清,objective-c,ios,Objective C,Ios,是否有人知道如何确定UITableView中的选定行或选定单元格?你能帮我做这个吗?我的应用程序确实遇到了这个问题。调用indexPathForSelectedRow或indexPathForSelectedRow以获得单个或多个选择 选择单元格后,将调用视图控制器的此方法: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath; indepath包含所选位置。您希

是否有人知道如何确定UITableView中的选定行或选定单元格?你能帮我做这个吗?我的应用程序确实遇到了这个问题。

调用
indexPathForSelectedRow
indexPathForSelectedRow
以获得单个或多个选择

选择单元格后,将调用视图控制器的此方法:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;

indepath
包含所选位置。

您希望实现
UITableViewDelegate
,只要点击一行,就会调用它。

不确定您到底在寻找什么。您看过UITableView文档了吗?对但我只想要一个代码,当这个单元格被选中时,将会出现一个警报。。您能帮助我吗?有人知道如何确定UITableView中的选定行或选定单元格。。。。什么?澄清你的问题。这只是个问题的一半。谢谢dasblinkenlight。。。六羟甲基三聚氰胺六甲醚。。我能举个例子吗?非常感谢。@AldeeMativo绝对感谢!在Xcode中,选择“帮助/文档和API参考”。当帮助窗口打开时,在左上角的搜索窗口中键入“didSelectRowAtIndexPath”(不带双引号)。这将为您带来许多匹配的文档。在列表的底部,你会发现一打样本,看看它们——它们展示了这种方法是如何工作的。太棒了。。谢谢它起作用了。。