mehran kml
mehran kml

Reputation: 31

get row of Cell in Table View Swift

there is a tableView Cell and a Text field Inside it . the question it is how can get indexPath.row of table View in text field Delegates . Exactly in textFieldDidEndEditing .

Upvotes: 1

Views: 1272

Answers (1)

user212514
user212514

Reputation: 3130

I think you're looking for UITableView.indexPath(for:). It "Returns an index path representing the row and section of a given table-view cell" and the index path contains the row.

For example, self.tableView.indexPath(for:myCell)

Upvotes: 4

Related Questions