Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8305689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:10:11+00:00 2026-06-08T18:10:11+00:00

This is what I want to do: I want a timer, to fire a

  • 0

This is what I want to do:
I want a timer, to fire a method and then, in the end of this method, be toggled off, and turn on an other timer on another method, and then entering a loop.

So what are the codes used to toggle between on and off the timer on a method?

In Delphi I use:

timer.enable:=True; // timer.enable:=False;

Are there a similar way to do it on objective-c?
I’m using Xcode 4.4
Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:10:14+00:00Added an answer on June 8, 2026 at 6:10 pm

    To turn the timer off, call invalidate on your timer like so:

    [yourTimer invalidate]

    And then to start a new one:

    NSTimer *newTimer;
    
                         newTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 //Every how many seconds
                                                                    target:self
                                                                  selector:@selector(methodToCall)
                                                                  userInfo:nil
                                                                   repeats:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a timer within a class, and when this timer fires I want
I modified this simple countdown timer form here: https://github.com/lunaryorn/snippets/blob/master/qt4/countdown.py as follows. Now I want
I want to measure time memory allocation using this code: long AForMemory = DateTime.Now.Ticks;
This is the first time ever I'm using AJAX, and I want to do
I want to make the time of each post to change in realTime. This
I have time in NSString like 15:15 I want to covert this NSString time
I want to get difference between two times. I calculate this by using following.
I want to learn .NET and I have 2 weeks time of this. I
I want to save a query only one time in the database, this is
I want to do something like this strtotime(next starting minute); If the current time

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.