Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swift get slected row data in tableview cell

override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {

    let indexPath = tableView.indexPathForSelectedRow() //optional, to get from any UIButton for example

    let currentCell = tableView.cellForRowAtIndexPath(indexPath) as UITableViewCell

    print(currentCell.textLabel!.text)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #swift #slected #row #data #tableview #cell
ADD COMMENT
Topic
Name
2+6 =