Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Swift :: white status bar swift 
Swift :: uitextview set placeholder text swift 5 
Swift :: swift pdf thumbnail 
Swift :: navigationBarTitle text size swiftui 
Swift :: symfony swiftmailer 
Swift :: swift programmatically set font 
Swift :: how to bold 1 word swift 
Swift :: Swift Switch Statement with Range 
Swift :: date format swift 
Swift :: swift array index of where 
Swift :: swift extension Array with element 
Swift :: how to add corner in swiftui 
Swift :: float vs double in swift 
Swift :: abstract class in swift 
Swift :: triple equals swift 
Swift :: Swift Create String Instance 
Swift :: Swift Overloading with Different Parameter Types 
Swift :: swiftui divider remove padding 
Swift :: Swift Generic Function 
Swift :: Swift static Property 
Swift :: xcode collapse all code blocks in class 
Swift :: Swift Arithmetic Operators 
Swift :: swift constraints 
Swift :: Function Call Using try Keyword Swift 
Swift :: get links from string or html a tag swift 
Swift :: where to save audio asset swift 
Swift :: swift hashable 
Ruby :: rails skip authenticity token 
Ruby :: rspec check if object of a class 
Ruby :: rails g controller 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =