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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:55:40+00:00 2026-06-05T12:55:40+00:00

I need to constantly update the a playback time in a label. I am

  • 0

I need to constantly update the a playback time in a label. I am getting the time NSTimeInterval currentProgress = self.moviePlayerController.currentPlaybackTime; which returns a double value. But the format in which I need to display is “MM:SS” (00:00). I have tried the following code

NSTimeInterval currentProgress = self.moviePlayerController.currentPlaybackTime;

float min = floor(currentProgress/60);
float sec = round(currentProgress - min * 60);

When the progress time is 10 minutes and 10 seconds it displays perfectly fine, as “10:10”. But the problem here is if the progress time is 1 minute and 7 seconds, it displays “1:7” in the label. My intended display is “01:07”. How can I do that?

  • 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-05T12:55:41+00:00Added an answer on June 5, 2026 at 12:55 pm
    NSString *time = [NSString stringWithFormat:@"%02d:%02d", (int)min, (int)sec];
    

    Try this. Should just work!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to refresh dbgrid constantly, in real time. Close and open dataset works
I need a very simple jQuery to constantly scroll a list of text items
so i have a list where i need to add new values constantly but
I need some advice as to how to approach a project I am getting
I need to create a view or a table valued function that returns one
Please see at the end, as I constantly update with latest investigation data. Currently,
I write financial applications where I constantly battle the decision to use a double
I need to update my UI (webpage) periodically with new values. I have PHP
What is the best way to constantly update the center of a mapView's latitude
I have an object that I need updated data from in every update in

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.