I need to set the interval value for an UISlider.
Please help..
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- back button text does not change
相关文章
- 现在使用swift开发ios应用好还是swift?
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
A flexible solution:
i would suggest is that put the level just below the slider where you want to put value and set maximum and minimum value then the in between value can be calculated by no of point and by division and finally display in uilabel the values. hope this will help
good luck
UISliders
do not 'increment' their value, they increase or decrease their value according to how they're touched. You can use these properties to set the slider limits:I know this question is old but I just want to share how I did this.
Assuming that the UISlider object has already been initialized, first, the minimum and maximum values of the UISlider object must be set:
Then, set the selector that will handle the changes in the slider:
Also, set the interval (to a property). It is important that the interval is positive. (And, really, the INTERVAL MUST BE POSITIVE.)
Declare the method(s):
yourSlider.value = x;
You should really read the documentation, lots of great resources in the iOS Developer Center.
Edit: With regards to your more specific question in the comments: