Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

create multiple timer dynamically in iphone development.

dartfrogdartfrog Posts: 13New Users *

my application is like multiple timer running at the same time. i have one `UIButton` to add timer. when user press the button, one instance of timer is running. if user press 10 times, 10 instances of timer is running. i am really noob for NSTimer. how to trigger the selector for multiple timer.

how should i do it? is there any example for it?
thanks for any help

Replies

  • Duncan CDuncan C Posts: 9,114Tutorial Authors, Registered Users @ @ @ @ @ @ @
    It isn't clear what you are asking. You can write a button action that creates and starts a new timer for every button press if you want to. Are these "one-shot" timers or repeating timers?

    If they are repeating timers, you really need a way for the user to cancel previously started timers. Otherwise you will create more and more timers with no way to stop them.

    What are these timers for? Is the user aware that they are creating timers? Is the user supposed to somehow manage a list of running timers?

    You need to provide more information about your goal for this application and how the user interacts with it.
    Regards,
    Duncan C
    WareTo

    widehead.gif
    Animated GIF created with Face Dancer, available for free in the app store.

    I'm available for one-on-one help at CodeMentor
Sign In or Register to comment.