对于 UITableViewCell (在 iPhone 上),我需要弄清楚如何获取它的当前位置?

发布于 2024-08-25 20:01:31 字数 170 浏览 3 评论 0原文

所以,想法如下。我有 UITableViewCell,当我单击它时,我想在该单元格中显示 UIActivityIndi​​catorView。我不知道如何找到 X/Y 或任何位置(虽然我可以找到 UITableViewCell 的框架大小,但它对给定单元格没有太大帮助:-)。 有什么建议吗?帮助?

谢谢你!

So, idea is the following. I have UITableViewCell, and when I click on it, I want to show UIActivityIndicatorView right in this cell. I cannot figure out how do I find the X/Y or any position (I can find the frame size of UITableViewCell though but it does not help much :-) for the given cell.
Any tips? Help?

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

此岸叶落 2024-09-01 20:01:31

如果您有单元格,只需将活动指示器作为子视图添加到单元格的 contentView 中即可。无需知道单元格在表格视图坐标系中的位置即可将活动指示器定位在单元格内。如果您没有对该单元格的引用,请调用表格视图的 cellForRowAtIndexPath: 方法。

If you have the cell, just add the activity indicator to the cell's contentView as a subview. There's no need to know the cell's position in terms of the table view's coordinate system to position the activity indicator within the cell. If you don't have a reference to the cell, call your table view's cellForRowAtIndexPath: method.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文