繁体   English   中英

UITableView单元格坐标

[英]UITableView cell coordinates

按下单元格时有什么方法可以获取单元格坐标?

我有UITableView,我想在按下的单元格上显示activityIndi​​catorView,为此,我需要单元格坐标。

didSelectRowAtIndexPath方法不提供此信息。

还有一件事,当我显示activityIndi​​catorView时,我希望UITableView中的颜色更暗(例如在UIAlertView中),当我完成某些工作时,我想带回灯光。 我该怎么做?

[tableView cellForRowAtIndexPath:indexPath]应该让您直接从didSelectRowAtIndexPath访问单元格。

UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
[cell addSubview:myIndicator];
[myIndicator startAnimating];

同样,在此方法中,对表的其余部分进行所有操作。

您无需打扰坐标。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM