Coder Social home page Coder Social logo

ttcounterlabel's People

Contributors

ascorbic avatar peisong avatar valentin-kalchev 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ttcounterlabel's Issues

Time not refreshed correctly

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.

Timer fidgits

When the timer counts down, it starts fidgeting. It seems like it adjusting to the small changes in number size. It looks really unprofessional.

Usable in Swift?

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.

Found a bug

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

Timer set

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!

countdownDidEnd delegate not being called

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.

Question about TTCounterLabel in app background state.

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:

  1. Start counter
  2. Press "Home" button --> (app in background)
  3. After some period of time - touch the app icon --> (app in foreground)
  4. Result: sometimes counter is reset to zero & stopped. (approximate probability - 2-3 times of 10)

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 *'

How to set condition in time?

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.

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.