hamzaghazouani / hgcircularslider Goto Github PK
View Code? Open in Web Editor NEWA custom reusable circular / progress slider control for iOS application.
License: MIT License
A custom reusable circular / progress slider control for iOS application.
License: MIT License
When you set the end point to the max value the track resets to the zero state. Expected behavior would be for the track to be fully filled in to match 100% completed.
I looked at the source briefly and in the scaleValue function there is some division that is returning 0 when the value should be 1 which may be causing the problem
I am using this slider on a player and its working fine . but some time its automatically become crash and i am getting the reason in the console that
assertion failed: Illegal interval: file /Users/sabakuch/Documents/Ravi/SlideMenu/Pods/HGCircularSlider/HGCircularSlider/Classes/CircularSliderHelper.swift, line 17
on line no 17 when i check
assert(min <= max, NSLocalizedString("Illegal interval", comment: ""))
I was just wondering if there is a way to animate (without user interaction) the slider to a specific value?
Now that swift package manager is officially backed by apple it would be awesome for this library to adopt it.
Hi,
I wonder what I miss with the setup. I've already tried to search at Stack Overflow, yet I haven't seen a related issue or answer to the problem.
Currently using xCode8.1\Swift 3
I have the following line of codes, circularSlider is an outlet.
override func viewDidLoad() {
super.viewDidLoad()
self.setUpCircularSlider()
self.onValueChangeUpdateData(self.circularSlider)
}
fileprivate func setUpCircularSlider(){
self.circularSlider.startThumbImage = UIImage(named: "bedTime")
self.circularSlider.endThumbImage = UIImage(named: "wakeUp")
let dayInSeconds = 24 * 60 * 60
self.circularSlider.maximumValue = CGFloat(dayInSeconds)
self.circularSlider.startPointValue = CGFloat(1 * 60 * 60)
self.circularSlider.endPointValue = CGFloat(8 * 60 * 60)
}
Having the following runtime attributes:
Notice the image, it doesn't look good.
Any input will be greatly appreciated.
Thank you.
Regards,
Jun
Hi, is it possible to add Carthage support?
Hi! Could you tell me how can I set a step value for the circular slider? Thank you very much!
How to realize the circular color gradient?
In other example type of view.
I want to display mid thumb point at specific point when view controller appear. How can I do this ?
When opening my project in xCode 11 I get the following error...
The target “HGCircularSlider” contains source code developed with Swift 3.x. This version of Xcode does not support building or migrating Swift 3.x targets.
Use Xcode 10.1 to migrate the code to Swift 4.
Any plans to migrate to Swift 4 in the CocoaPod?
The HGCircularSlider.podspec declares as deployment target 8.0 but the minimum support by Xcode 12 is 9.0. So we need update it:
s.ios.deployment_target
= '9.0'`
Now it produces the following error:
The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99.
Hey,
Could you please give me a hint how to fix following problem:
when tap on the slider thump it freezes and doesn't move or seems like thumb control is not on the round thumb itself, because it slides to the side
thanks
*/SourcePackages/checkouts/HGCircularSlider/Package.swift The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99.
I added slider on View controller.
And I opened this controller with modalTransitionstyle (coververtical) from other controller.
But I can't move slider smoothly.
Anyone can help this?
Thank you.
Hi,
would it be possible to make CGLineCap available to set and make it for example square? I know I should probably make pull request but I am not good at this. I think it's easy to change and I would very much like it.
Thanks
How to restrict the slider to go around after reaching the max value?
I was looking for a continuous updates option (like the standard Cocoa slider). I only seem to be getting updates on release... Is there a setting/property I'm not finding?
Hello @HamzaGhazouani,
Thank you for sharing your work.
I am using this control in an app. The feature requires to show 12 hours clock (like regular wall clock) but the user can opt AM/PM. Like user can choose to sleep from 10 PM to 6 AM or 10 AM to 6 PM.
Can you please give me an insight n how to do this?
Your help is very much appreciated. TIA :)
Hi, I am not sure if someone made this feature but I cannot solve it myself...
Any thoughts on how to have stop position and have lets say starting point on top from 0 and goes to 100 and stops so I would not be able to move slider further
Advise would be much appreciated. Thank you
@HamzaGhazouani
I can't find backtrackLineWidth property when installing the pod, although it's available in the example.
I'm using version 1.0.3 of the pod
how to can add dynamic multiple circle rings
First of all, great little library you have here. Works great! :)
I'm using the RangeSlider and have set the minimumValue to 5 and the maximumValue to 30.
When I touch on one of the thumbs it jumps forward by 5 (the minimumValue). A quick fix I did was to change the delta function in CircularSliderHelper.swift. Instead of...
return scaleValue(deltaAngle, fromInterval: angleIntreval, toInterval: interval);
I changed it to...
let scaledValue = scaleValue(deltaAngle, fromInterval: angleIntreval, toInterval: interval) - interval.min;
return scaledValue;
This seems to have solved the problem. I'm not sure if this is the best place to put this or if it should've been in the ScaleValue function?
How to make it rotate anti clockwise ?
does it support gradient color?
I've been looking online for about 2 hours now and I can't find a fix for this error message. Any idea what is going on and how to solve it? BTW your circular slider is excellent for my metronome. Thank you so much for any help!
I'm having a weird issue that I don't know how to fix.
I dragged a view through storyboard and changed its class to CircularView
. In code, I'm setting the numberOfRounds
property as so:
circularSlider.numberOfRounds = 1
My app crashes with EXC_BAD_ACCESS
.
I don't see anything strange in the definition of the method in the source code, so I don't know why this isn't working. If I customize the view via Interface Builder, nothing shows up.
I installed the dependency with CocoaPods. Currently using v2.2.0.
Trying to debug the app:
(lldb) po circularSlider
▿ Optional<CircularSlider>
- some : <UIView: 0x7fbae370a270; frame = (82 146; 250 250); autoresize = RM+BM; layer = <CALayer: 0x600003d0ef80>>
(lldb) po circularSlider.numberOfRounds
error: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0).
The process has been returned to the state before expression evaluation.
(lldb)
And again, the numberOfRows
property is not even set as an optional in the source code, so I don't think it's crashing due to it being nil? I'm very dumbfounded with this problem.
How can I change the trackFillColor in real time
I try to make the filled track start from a customized point other than the 12 o'clock direction but could not find how.
One way I have thought about is to use RangeCircularSlider and disable or hide the startThumb, but I failed.
Any solutions?
Following the setup instructions produces the result "Failed to render and update auto layout status..." when I try to change the class of a View to "Circular Slider" or any of the others provided. Running OS 10.12.6. The circular slider does not appear and indeed no functionality seems to work.
I am having rendering issues, any chance this wonderful package will be updated for the new stuff? Thanks.
Hello, i add "github "HamzaGhazouani/HGCircularSlider"" to my Cartfile, update dependencies and add framework in "general>linked frameworks and libraries", but when i change class on my view, view does not display slider.
How to zoom the thumb slider when highlighting, whether it supports this feature
Could you please upgrade the framework to use Swift 5
Is there anyway to make it so that it doesn't jump but goes through smoothly?
I enter the example folder and run pod install
. Result:
[!] The plist file at path `/Users/apple/Documents/xcode_projects/HGCircularSlider/Example/HGCircularSlider.xcodeproj/project.pbxproj` doesn't exist.
If UIViewController is in 'segue kind - present modally' mode (ios 13) the slider stops working because a gesture that closes the modal window (swipe down) is recognized
Is it possible to add a stop when maximum has been reached and same for minimum? I don't want the slider to start over again.
Hi,
Can you add feature like clock sliding from arc from circle like apple clock
Using Xcode 8.3, I have several swift compiler warnings : 'M_PI' is deprecated: Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting.
Hi Hamza,
It seems i can't find the documentation.
My question: Can we disable touch on the Circularslider?
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.