How to know the current UITableView cell position with respect to the UIViewController in swift 3.0? In my case i m using a label on UITableViewCell with UITapGesture as per my requirement in Swift.
This is done easily with convert(_ rect: CGRect, from view: UIView?)
. See more details here. So based on that, you can try this:
let rect = view.convert(tableView.rectForRow(at: indexPath), from: tableView)
Where view
is your viewController
's view and tableView
is the table view containing the cell.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With