I’m placing UITextfield and UISwitch instances in a UITableView. I can detect tags and values, but not sure how to detect if they are UISwitch or UITextField?
I intend to set different actions for each.
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.
You can check the class of the sender like this:
However, this may not be the optimal setup: potentially you could wire up different selectors when you create your table cells with a switch vs. text field for a better solution.