I want to read text of a textField inside the tableView Row And Button is also inside the so when user clicks that row textfield data set into database.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Two tactics.
subclass UITableViewCell, add a property for your textField. Then in
-tableView:willSelectRowAtIndexPath:you can call UITableView’s-cellForRowAtIndexPath:to get the cell. Use the property you added to access the UITextField.Don’t subclass. When you add the UITextField to the UITableViewCell set it’s tag property to some unique identifier. Use the same tactic as above to get the UITableViewCell, but then get a pointer to the UITextField by using UIView’s
-viewWithTag: