Comments (6)
Sure ^^ Will add this feature in next version (this or next weekend).
from nocircleselector.
Thanks, great work any way, this is awesome. And one more thing. Is there a simple way to move programatically a dot ? I'm actually using it as a slider at the same time as a progress bar for audio duration. So I would like to move dot while the audio is playing in an updating
methods.
I'm trying to directly set the NOCircleDot angle
property, but does't seem to refresh the UI.
from nocircleselector.
Thank you so much^^. To move a dot via code you need to find the correct dot and setAngle:. You can calculate the angle with method: angleForValue:maxAngle:maxValue:minAngle:minValue:. Then you need to redraw NOCircleSelector.
Still, such use of the method is not animated ;). If you want animations I can add them too, that's a good idea. Will also add it in next version.
from nocircleselector.
This is what I'm doing, for the first part.
NOCircleDot *dot = ((NOCircleDot *)[[circleSelector dots] objectAtIndex:1]);
dot.angle =
[NOCircleDot angleForValue:audioPlayer.progress maxAngle:dot.maxAngle
maxValue:audioPlayer.duration minAngle:kbigMinAngle minValue:0.0];
[dot.textLabel setText:[NSString stringWithFormat:@"%@", [Utils convertSecond:
[NOCircleDot valueForAngle:dot.angle maxAngle:kbigMaxAngle maxValue:audioPlayer.duration minAngle:kbigMinAngle minValue:0.f]]]];
But I'm not sure how to redraw the NOCircleSelector properly, since there is not public methods to do it.
from nocircleselector.
Very well, then you only need to call this after your code:
[cicleSelector setNeedsDisplay];
This will call delegate method circleSelector:updatedDot:, so if you have your text handler there it will change the text and you can delete it here.
from nocircleselector.
Oh my bad I was calling setNeedsDisplay
on NOCircleDot
-_- !
Great it works, as you said, the animation would be a nice enhancement. I'll wait for it :).
Thanks for your help, and for your work.
from nocircleselector.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nocircleselector.