vadymmarkov / markrangeslider Goto Github PK
View Code? Open in Web Editor NEWA custom reusable slider control with 2 thumbs (range slider).
Home Page: https://github.com/vadymmarkov
License: Other
A custom reusable slider control with 2 thumbs (range slider).
Home Page: https://github.com/vadymmarkov
License: Other
Hi there,
It would be nice if you could define the stepping value. so if for instance the steppingValue is 1, then the slider would go 10, 11, 12, etc... instead of 10.1, 10.2, etc...
Or if the stepping value is 10, then it goes 10, 20, 30, etc...
Otherwise, great slider!
The license.md file in the repo states that the code is under MIT license but the actual source files contain "Copyright (c) 2015 Vadym Markov. All rights reserved.".
The latter is probably the XCode default?
If I use a custom Thumb image, tapping and dragging the thumb only works if the tap started from the middle to the top of the thumb.
If you tap at the bottom of the thumb, it doesn't work.
Video: https://youtu.be/M9O1J0AIm3Q
The component would be awesome if it could be completely self-contained and not relied on any images.
Hello , it possible to Change the line color ?
Thumb image seems to be shifted a little bit to the right and does not match the track.
I don't have modules enabled. Is it possible to use #import <UIKit/UIKit.h> instead?
Hi, I use smaller thumb image than standard. But them doesn't work properly.
Change CGSize leftThumbImageSize = self.leftThumbImageView.frame.size;
CGSize rightThumbImageSize = self.rightThumbImageView.frame.size;
in layoutSubviews to CGSize leftThumbImageSize = self.leftThumbImageView.image.size;
CGSize rightThumbImageSize = self.rightThumbImageView.image.size;
looks like fix.
Hi whenever, we are dragging, the table view controller is popping up to previous view controller so how could we handle such scenario? I mean how to stop from popping back to previous view controller?
I can run the Demo and the range slider looks perfect. But when I build my own project the control seems oddly merged with what seems to be a switch. Any ideas of what I'm doing wrong? Please see my code and screenshot below. Thanks for any insight you can provide.
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
var rangeSlider = MARKRangeSlider()
var frame = CGRectZero
frame.size.width = 300
frame.size.height = 20
rangeSlider.frame = frame
rangeSlider.addTarget(self, action: "rangeSliderValueDidChange:", forControlEvents: .ValueChanged)
rangeSlider.maximumValue = 1.0;
rangeSlider.minimumValue = 0.0;
rangeSlider.rightValue = 0.7;
rangeSlider.leftValue = 0.2;
rangeSlider.minimumDistance = 0.2;
rangeSlider.translatesAutoresizingMaskIntoConstraints = false
let theJumpNumberView = self.view
theJumpNumberView.addSubview(rangeSlider)
let horizontalConstraint = rangeSlider.centerXAnchor.constraintEqualToAnchor(theJumpNumberView.centerXAnchor)
let vertivalConstraint = rangeSlider.centerYAnchor.constraintEqualToAnchor(theJumpNumberView.centerYAnchor)
let widthConstraint = rangeSlider.widthAnchor.constraintEqualToAnchor(nil, constant: 300)
let heightConstraint = rangeSlider.heightAnchor.constraintEqualToAnchor(nil, constant: 20)
NSLayoutConstraint.activateConstraints([horizontalConstraint, vertivalConstraint, widthConstraint, heightConstraint])
}
If i set left value first and then right, left value will still be not set. Code below works but if i set left value first it will be 1
_ageSlider.minimumValue = 14.0;
_ageSlider.maximumValue = 99.0;
_ageSlider.rightValue = 28.0;
_ageSlider.leftValue = 18.0;
_ageSlider.minimumDistance = 1.0;
[_ageSlider addTarget:self
action:@selector(rangeSliderValueDidChange:)
forControlEvents:UIControlEventValueChanged];
[self updateRangeText];
I installed Mark Range Slider and in it I gave the slider.minimumValue = 15 and leftValue as 20. But when i started scrolling it showed the left value to be 0 which was quite surprising.
I noticed that for each and every minimum value the code returns the starting value from 0. I tried a lot to understand and fix the issue but it didn't work.
I have implemented this party and willing to continue this . Please fix this issue as soon as possible because I can not afford to be late regarding this issue.
When specifying use_frameworks!
in Podfile, all the resources are located in a separate framework bundle, so [UIImage imageNamed:]
returns nil. This can be fixed with 2 ways - fast and the right way =)
imageNamed:
with imageNamed:inBundle:compatibleWithTraitCollection:
(works only ios8+)Hello,
how does one actually change the track or range image?
It seems that the image set during setUpViewComponents and changing the "trackImage" property doesn't change the image currently being used in trackImageView.
Your widget looks cool man, but why you don't give support to Carthage?
Is there a way to make thumb interaction area bigger? I use image which is 85x85px, but thumb still behave like it 32x32
+[UIImage imageNamed:inBundle:compatibleWithTraitCollection:]
The functions added to the ios8
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.