I’m okay to display a label text as soon as a slider value changes, but is there a smarter way ?
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.
UISlideras part ofUIKithas no subview ofUILabeltype.If you’re gonna need a lot of this kind of visual controls you might consider subclassing
UISlider.Otherwise just use seperate
UISliderandUILabel.There are more possible approcahes to this functionality:
You’re probably familiar with at least the first one: targeting for
valueChangedevent.More elegant approach (dabatable) would be Key-Value Observing.
Key-Value Observing Programming Guide