triggertrap / ttcounterlabel Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Setting the time on the TCounterLabel, running the mode and then resetting the time causes the previous time to flash on the display before showing the new time.
When the timer counts down, it starts fidgeting. It seems like it adjusting to the small changes in number size. It looks really unprofessional.
Im trying to get this working in a swift file.
I have downloaded TTCounterLabel.h/m and TTTAttributedLabel.h/m and have added it into my project. I have added #import TTCounterLabel.h
to my bridged header and everything is working fine counting up.
However I'd like it to count down, and I'm having some problems, something to do with the following enum:
typedef NS_ENUM(NSInteger, kCountDirection){
kCountDirectionUp = 0,
kCountDirectionDown
};
I've tried using this code in the swift file but it failed saying that Int.Type does not have a member named kCountDirectionDown
label.startValue = 60000 // <-- This works fine
label.countDirection = .kCountDirectionDown
//I've also tried
label.countDirection = kCountDirection.kCountDirectionDown
label.countDirection = kCountDirection.Down
label.countDirection = .Down
Am I doing something wrong, or can I not use this with swift?
Thanks.
In the sample project, there is no circular view which counts up/down with the time as you have shown in the screenshot.
Was that just an example shot, or did you create that view?
Hi, Ross.
Great control, but I found some bug.
TTCounterLabel.m - line 136:
[self setValue:(_startValue - milliSecs)];
Here you're setting unsigned long value. You need to be sure about value is not negative. Such situation may appear after application was in background. And you know what happen with unsigned variables after setting negative value in C :)
Hey,
I don't get it.
Why u set your timer like this:
[NSTimer timerWithTimeInterval:0.02
target:self
selector:@selector(clockDidTick:)
userInfo:nil repeats:YES];
With time interval of 0.02 and when I try to set my own timer the same as u do, it's faster then real millisecond?
(I know that it isn't StackOverFlow here but I m really curious about this point :)
Thanks in advance!
Occasionally this delegate isn't being called. The VC I am running the control on is a very CPU / UI intensive page 60% CPU utilization on an iPhone 5 running iOS 7.04.
Sometimes the mills is not needed. Or how can I disable it? Thanks.
Thank you for the work you done to create this component! It awesome!
Testing TTCounterLabel's timer I found that it can be reset to zero & stopped when the application is in the background state.
The maximum value which I was able to detect - about 42 hours. At the same time - I repeatedly faced with the fact that the counter stops a couple of hours later (after its start) while application in the background.
I used my iPad 4 with iOS 7.0.4 for my tests.
Steps to reproduce:
So my question is:
What am I doing wrong using TTCounterLabel?
Is it possible to use it without unexpected stops on app background mode?
waiting for your answer,
Best wishes.
Property 'maximumLineHeight' not found on object of type 'TTCounterLabel *'
I want to set that if 60 seconds completed then view will popover or else? where i have to set condition for this ?
if (seconds==50)
{
gameover
}
if (userclickonthisbutton )
{
timer reset and start again
}
waiting for replay thanks.
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.