Coder Social home page Coder Social logo

eranboudjnah / mtcircularslider Goto Github PK

View Code? Open in Web Editor NEW
139.0 7.0 32.0 767 KB

A feature-rich circular slider control written in Swift.

License: Other

Swift 89.84% Ruby 7.51% Shell 2.66%
swift widget slider-component slider-control slider ios

mtcircularslider's People

Contributors

eranboudjnah avatar ezor 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

mtcircularslider's Issues

Slider not receiving touch events in UIScrollView?

It seems like the slider can't receive touch events from within a scrollview. It was working well before, but the minute I put it in a scrollview it stopped working. As far as I can tell, there's nothing blocking its way or anything, it just won't respond to touches.

Use getAngle() to floating over

From the getAngle() func u create on latest commit. Can i know how to use that? i need to make the label floating over the getAngle().
screen shot 2016-10-11 at 12 13 05 pm

Label stick to the knob value

How can i make the label is stick to knob on view when the slider value is changed? Currently label in this custom slider only stick in one place.

Is it possible to drag the knob continuously in a circle?

I set it to go from 0 to 360. I can't drag it past the leftmost point, though I can get around it by clicking to get past that point.

That would be very nice, though I can understand that it could be difficult to implement. I'm trying to make a control to set and change the direction in a driving app.

Adding Image to Thumb

I want to add an image to the thumb for the slider and I added that image to the thumb layer but it doesn't get reflected. Please let me know how this can be achieved?

I added the below code in the prepare method

thumbLayer.backgroundColor = UIColor.clear.cgColor
thumbLayer.contents = UIImage(named:"knobPointer.png")?.cgImage

Changing value of slider

I'm building a video editing app and I'm using MTCircularSlider to set the current time in the video.
The problem is that since it is a video, I set the .value a lot of times per second and MTCircularSlider can't handle.
I found a quick fix by deleting the sendActions(for: .valueChanged) and now it works perfectly.

Before:

    @IBInspectable
    public var value: Float = 0.5 {
        didSet {
            let cappedVal = cappedValue(value: value)
            if value != cappedVal { value = cappedVal }
            setNeedsDisplay()

            sendActions(for: .valueChanged)
        }
    }

After

    @IBInspectable
    public var value: Float = 0.5 {
        didSet {
            let cappedVal = cappedValue(value: value)
            if value != cappedVal { value = cappedVal }
            setNeedsDisplay()
        }
    }

Slider triggers interactive dismissal in iOS 13

In iOS 13, the new modal presentation style has an interactive dismissal feature that allows you to swipe down to dismiss the view controller.
Trying to drag the slider in a presented view controller also triggers this dismissal, making it basically impossible to use.

Value issue when taping outside of a partial slider

Hi,

When using a partial Slider as the one in the demo project (the one in the top right corner), if you tap outside of the slider (i.e. tap at the location of the star as shown in the attached screenshot), the value is set to max value.

slider

Swift 3 compatibility

Hey, I'd love to see this lib available in Swift 3 so I can implement it in my project.

Thanks ๐Ÿ˜„

slider in a scroll view misbehaves

I have the circular slider inside a scroll view. tapping to change the value works but dragging it, 95% of the time the scroll view moves, not the slider.

Implementation code help for a newbie

Hello and congrats for the idea, is really useful!
I'm newbie in Xcode environment, and I need to know what's mean "self.slider" and "self.sliderArea".
I add IBAction for UISlider in my ViewController.swift but I know this is not the entire work.
Does anybody can help me? Thanks!

UIControlEvents.valueChanged stops audio playing

Even when is declared in target it stops audio playing though AVPlayer

self.circleSpinner.addTarget(self, action: #selector(PlayerViewController.circleSpinnerAction), for: UIControlEvents.valueChanged)

audio just will not play

Install Version 1.2.0 not 1.0.0

Captura de Pantalla 2021-07-08 a la(s) 19 10 10
I have already Xcode 12.5.1 ,
pod version -> 1.10.1'

the version pod install always 1.0.0 but I need the 1.2.0

in podFile Specs have

"# Uncomment the next line to define a global platform for your project"
platform :ios, '12.0'

target 'MyAppTarget' do
"# Comment the next line if you're not using Swift and don't want to use dynamic frameworks"
use_frameworks!

pod 'MTCircularSlider '

end

the version 1.0.0 do not have the attribute areTrackCapsRound, is there another way to set the corners for the trackPath? not the thumb....

"Failed to render and update auto layout status" error

error: IB Designables: Failed to render and update auto layout status for FirstViewController (9pv-A4-QxB): dlopen(MTCircularSlider.framework, 1): no suitable image found. Did find:
MTCircularSlider.framework: required code signature missing for 'MTCircularSlider.framework'

So far it doesn't seem to affect anything. I am on Xcode 9.4.1

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.