For UITableViewCell (on iPhone) I need to figure out how to get it's current position?
-
19-09-2019 - |
Question
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!
Solution
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow