GithubHelp home page GithubHelp logo

vadymmarkov / markrangeslider Goto Github PK

View Code? Open in Web Editor NEW
184.0 184.0 50.0 97 KB

A custom reusable slider control with 2 thumbs (range slider).

Home Page: https://github.com/vadymmarkov

License: Other

Objective-C 94.36% Ruby 2.77% Swift 2.87%

markrangeslider's People

Contributors

ansonyao avatar arrnas avatar ashfurrow avatar bryanleezigbang avatar hrishidev avatar ikovalisko avatar mussacharles avatar vadymmarkov avatar vvit avatar xuaninbox avatar yeonmee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

markrangeslider's Issues

Add stepping value

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!

Source files seem to conflict with the license

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?

Weird handle under the left handle

Works great except for a strange thing (see below).
There's a second handle under the left most handle.
Not doing anything special - just copied and pasted code from github to init the slider.

screen shot 2015-07-19 at 12 43 29 am

Modules @import

I don't have modules enabled. Is it possible to use #import <UIKit/UIKit.h> instead?

Doesn't work with smaller than standard thumb images.

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.

UITableViewCell subView MARKRangeSlider issue

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?

range slider seems to be combined with a switch?

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.

screen shot 2015-12-18 at 2 51 45 pm

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])
}

Do not set left value

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];

Left value always starts from 0

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.

trackImage is nil when using cocoapods + use_frameworks

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 =)

  1. replace imageNamed: with imageNamed:inBundle:compatibleWithTraitCollection: (works only ios8+)
  2. create a separate resource bundle with images and reference it in code

trackImage

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.

Carthage support

Your widget looks cool man, but why you don't give support to Carthage?

Thumb interaction area

Is there a way to make thumb interaction area bigger? I use image which is 85x85px, but thumb still behave like it 32x32

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.