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 7824347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:34:05+00:00 2026-06-02T08:34:05+00:00

I am developing a QuiZ app. It needs a countdown timer, In that I

  • 0

I am developing a QuiZ app. It needs a countdown timer, In that I want to start a timer at 75:00.00 (mm:ss.SS) and decrease it to 00:00.00 (mm:ss.SS) by reducing 1 millisecond. I want to display an alert that Time UP! when time reaches to 00:00.00 (mm:ss.SS).

I am displaying the time by following below link

Stopwatch using NSTimer incorrectly includes paused time in display

  • 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-02T08:34:08+00:00Added an answer on June 2, 2026 at 8:34 am

    Here is a simple solutions to your problem.

    Declarations

    @interface ViewController : UIViewController
    {
        IBOutlet UILabel * result;      
        NSTimer * timer;                
        int currentTime;
    }
    
    - (void)populateLabelwithTime:(int)milliseconds;
    -(IBAction)start;
    -(IBAction)pause;
    @end
    

    Definition

    - (void)viewDidLoad
    {
        [super viewDidLoad];
    
        currentTime = 270000000; // Since 75 hours = 270000000 milli seconds
    
    
    }
    
    -(IBAction)start{
       timer = [NSTimer scheduledTimerWithTimeInterval:.01 target:self selector:@selector(updateTimer:) userInfo:nil repeats:YES];
    
    }
    -(IBAction)pause{
        [timer invalidate];
    
    }
    - (void)updateTimer:(NSTimer *)timer {
        currentTime -= 10 ;
        [self populateLabelwithTime:currentTime];
         }
    - (void)populateLabelwithTime:(int)milliseconds {
        int seconds = milliseconds/1000;
        int minutes = seconds / 60;
        int hours = minutes / 60;
    
        seconds -= minutes * 60;
        minutes -= hours * 60;
    
       NSString * result1 = [NSString stringWithFormat:@"%@%02dh:%02dm:%02ds:%02dms", (milliseconds<0?@"-":@""), hours, minutes, seconds,milliseconds%1000];
        result.text = result1;
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing Quiz project. In DetailsView I want to display the Question and
I am developing an quiz based app in that when the user clicks any
I'm developing an iPhone app. I need to create a Quiz application that has
I am developing an quiz based app and i wanted to know how i
I am developing a quiz based app. The quiz contains 1 question and 4
I'm developing an Android app which is a quiz. On the other hand, I'm
The web application that I am developing right now has something called quiz engine
Let me start by explaining my scenario: I am developing a quiz engine in
I am developing a simple quiz app on Android. The questions in the quiz
The web application that I am developing right now has something called quiz engine

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.