Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to reference Countdown Label in delegate for labels in tableview cells? #32

Open
flintcreativestudio opened this issue Mar 4, 2018 · 3 comments

Comments

@flintcreativestudio
Copy link

Is it possible / how do we get a reference to the countdown label object from the delegate methods?

In the example it works easily because it is based on a static Countdown Label named "countdownLabel6" , but I am implementing the countdown in a tableview.
I wish to update/manipulate the CountdownLabel within the tableview cells when they are counting down, but am stuck when trying to think of how to reference back the respective Countdown Label for that delegate call.

ie. tableview list of countdown labels start counting down, and I want the text to change to "Time's Up!" when the respective countdowns are complete.

Can anyone help?

@dziedziela
Copy link

Hi, did you manage to resolve this?

Thanks

@flintcreativestudio
Copy link
Author

Oh yeah, it's actually very simple, just initialise all the countdown code inside the custom table cell's model. That way, within the cell's model, your countdown code has access to all the cell's properties without needing to fumbling with finding out which cell it is on the tableview.

@dziedziela
Copy link

awesome, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants