tomthorpe / ttrangeslider Goto Github PK
View Code? Open in Web Editor NEWA slider, similar in style to UISlider, but which allows you to pick a minimum and maximum range.
License: MIT License
A slider, similar in style to UISlider, but which allows you to pick a minimum and maximum range.
License: MIT License
In TTRangeSlider.m, line 315, you have:
if (self.enableStep && self.step>=0.0f){
_selectedMinimum = roundf(self.selectedMinimum/self.step)_self.step;
_selectedMaximum = roundf(self.selectedMaximum/self.step)_self.step;
}
If self.step == 0.0, then there is a divide by zero setting selectMinimum and selectMaximum to NaN.
Hope this helped.
I can change only circle diameter with "handleDiameter".
But if I want square, parallelogram or other figure? I can change it in code but will be great to use custom view for handle.
Thanks a lot.
hello sir,
its really nice and easy to use library for ranging with a awesome animation but as you have describe to change the thumb image which changes both the thumb image, so is it possible to change the first and second thumb image differently for the first thumb image will be x.png and second will be y.png
any suggesting will always be helpful
Thank you
Hi,
First of all great control, really love it. I'd like to suggest to introduce blocks API and a flag to fix min and max labels on corresponding sides of control.
Cheers,
Andrej
As the title says, if you tap a handle during drag of parent view, it will stay enlarged until tapped or dragged again.
Steps to reproduce:
I cannot use it with PureLayout because initForAutolayout calls init on UIViews. Could you implement init method?
How to detect value change in Range Slider?
Add target for value changed does not work.
PS. Thanks a lot for the great work and TTRangeSlider.
It would be good to implement intrinsicContentSize
. My current use case is self-sizing cells, for the time being I have to manually fix the height of range slider, but I guess control could do that itself.
when I enable the step, I set the selectedMinValue and selectedMaxValue, which they only in one step,the left label position is always at originPosttion.
I want set frame for selected value labels. Current, it in top. I want move labels to bottom.
Install through cocoapod will not have minDistance/maxDistance options. But the cocapods indicated the installed version is 1.0.2. It seems that the files from cocoapods are not same as the github. Please advise it. Thanks
I am using the slider in a view that has an action sheet. When opening the action sheet the color of the slider line and the handles changes. Only the slider line between the handles doesn't change. When closing, the color changes back to the tint color that I had set, but I set a custom color for the handles and I don't want to use the tint color for the handles.
Preferably, opening an action sheet shouldn't change the colors, but at the very least, the colors shouldn't permanently change after closing the action sheet.
At least handleBorderWidth and handleBorderColor are not accessible with pod integration.
It must be because they are not explicitly public, and btw, internal by default.
Hello.
Last release was in July 2015.
Please make release with all last changes and update pod version.
Thank you.
Hey,
due to the issue in cocapods (tobihagemann/THLabel#28) IBDesignables would not work in projects with iOS Version <= 7. Other projects maintain a branch without IBDesignables integrated.
Can you pls do the same? The compile error in Interface builder really makes problems :-(
This is not functional but mostly UI -
Have the range between the min and max to be in a custom color and maybe thicker
CocoaPods version does not have labelPadding property yet
There are two handles. The minimum and maximum. If I want to set two different images to both of them like minus icon and plus icon, I can't.
hello thank you for this good library but i have question possible to set min value on right side and max value on the left side ?
Best Regards
result minLabel still hidden
Hello! Just installed the pod and an UIView, set its class to TTRangeSlider. The problem is that when i want to change the value the slider its glitchy and does not slide more than 5-6 units with the animation on the slider thumb staying zoomed in. Do you have any ideas why this is happening?
If a range between selectedMinimum and selectedMaximum is very small, labels position are incorrect. This situation happened when I have created cell from a nib with TTRangeSlider with my own minValue, maxValue, selectedMinimum and selectedMaximum. But if the range between selectedMinimum and selectedMaximum are bigger, all is correct.
The release in the podspecs lacks some of the newer features from later commits, such as hideLabels
Hello @TomThorpe , how we can add Image to leftHandle and rightHandle for both normal and highligted state.
how to write text in the label per example :
10 dollar
Setting handler size after min/max was set leads to handlers collaps.
Change line position - bug gone.
***.xib: error: IB Designables: Failed to render and update auto layout status for UIView (i5M-Pr-FkT): dlopen(TTRangeSlider.framework, 1): no suitable image found. Did find:
TTRangeSlider.framework: required code signature missing for 'TTRangeSlider.framework'
Hello,
Is that possible to have no selected values ?
When use it programmatically rightHandle is not shown and seems like the slideeLine width is greater than screen size
here is my code
self.rangeSlider = [[TTRangeSlider alloc] initWithFrame:CGRectMake(0, 0, self.rangeSliderContainer.frame.size.width, self.rangeSliderContainer.frame.size.height)];
[self.rangeSliderContainer addSubview:self.rangeSlider];
self.rangeSlider.delegate = self;
self.rangeSlider.minValue = attribute.minimum;
self.rangeSlider.maxValue = max;
self.rangeSlider.selectedMinimum = currentMin;
self.rangeSlider.selectedMaximum = currentMax;
self.rangeSlider.step = attribute.sliderSteps ? attribute.sliderSteps : 1;
self.rangeSlider.enableStep = YES;
First off, thanks for a very nice project. Secondly, I could see this being a low priority since it might be a bit of an edge case.
My use case involves another UI element that toggles on and off the range functionality of TTRangeSlider. Think of a switch that just toggles the disableRange property of TTRangeSlider.
Repro Steps:
What happens:
The min handle reappears but the minLabel does not.
Hi.
The Slider control are very useful, and very nice.
But I found an issue.
If I open several viewcontrollers, the slider is working on first viewcontroller without no issue, but on top viewcontroller slider freeze, and animate irregularly.
For example, I push 3 viewcontrollers. then on the first viewcontroller is working fine, but on the third controller is not working well.
Can you fix the issue?
Thanks.
I tried to use the slider with 1,000 as min value and 5,000 as max value, and the sliding process is so laggy 😐 is the valid max range only 0 to 100?
Thanks in advance! 😄
Hi... I am using TTRangeSlider in my app. I am instering the state of the TTrangeslider (min, max) to a table in FMDB in order to preserve its state whenever the users open the app again...
However, I am having problem with it. The delegate always update it to 10,90.. I checked the TTRangeSlider.m file and in that class, u set these values as selectedmin and selectedmax in initialiseControl method.
Now i ask that how could i request an sql selection in TTRanfeSlider class and set the selectedmin and selectedmax values to the values in the table?
Thanks
I tried to import TTRangeSlider in my Swift project but unfortunately not work. Give error the file for TTRangeSlider.h not found in Bridge Header
I need to create the range slider between two different dates.. its possible?
How can I use this component as Vertical Range Slider?
Really impressed with this library, love the attention to detail.
Just one feature missing for me is the ability to add a shadow to the handles. Just needed to expose those CALayer properties and this would be perfect.
Thanks.
Can I customize the label for the maximum value?
For example, I'd like to put label 'No limit' for maximum value if user drags to maximum and treat only min value in this case.
How to modify the background image?How to add borders?
I was trying to figure out how to add this in a PR, but couldn't see where is best
If the min,max is 1 and 100,000,000 and I want to pick a range for 1 to 100, it is hard.
if the steps are not linear or exponential, smaller selected values get a finer resolution than the higher values
similarly, might be also good to input an array of not even steps like [1,12,100,400,1000,10000,123545, 100000] for possible options to choose instead of linear steps or step by 1
Is there a way to not get continuous callback when the slider is changed? I want to the delegate method to be fired only when the finger is released from slider.
How to get Min Max Value at the Sliding time please help me
I have to try this by using below code but it's never called...
public func rangeSlider(_ sender: TTRangeSlider!, didChangeSelectedMinimumValue selectedMinimum: Float, andMaximumValue selectedMaximum: Float) {
print(selectedMinimum)
print(selectedMaximum)
// updateLabelsValues(selectedMinimum, max: selectedMaximum)
}
And I have Also Extent my class by TTRangeSliderDelegate
Thanks in Advance.
Thanks for the awesome TTRangeSlider. But can you tell me how to set time range?
like 10:00 AM to 10:00 PM
Hello,
I'm using your library, it's awesome and fits all my needs. I wanted to ask is there any possibility to access text label in order to change text?
One more note, I'm using slider via bridging header and swift.
@TomThorpe
The podspec is outdated.
It would be great if the CocoaPod was updated. Is that in the works?
For example, red slider in the middle area,other gray
This happens when minDistance isn't set and an alert controller is presented/dismissed within the view controller.
I have 5 UITableViewCells, each having a TTRangeSlider inside of it within scope; some have a min/max range on the control and some don't. This happens to all of the range sliders within each cell when we present a UIAlertController and the user dismisses it (presses OK).
I prevented this by forcing the 'minDistance' property, with a default value of zero for the controls that we do not use to enforce but curious if anyone has experienced this issue themselves?
can you add support to minimumTrackTintColor for single thumb?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.