I have a tableView with custom cells in it, each cell has a UISlider.
Now I want to create a method to get the values of those UISliders, but I don’t know how to access each cell and its slider value.
Thanks in advance!
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.
First add a tag to each slider so you no which slider is which:
slider.tag = 0 //Can be any unique integerThen register a method for slider changes:
[slider addTarget:self action:@selector(sliderUpdate:) forControlEvents:UIControlEventValueChanged];Finally in your method
Tag will now be the same unique integer you used before. It is a way of identifying the element.