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

  • Home
  • SEARCH
  • 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 5967711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:59:01+00:00 2026-05-22T19:59:01+00:00

I currently have a application which will display the time allocated to a user

  • 0

I currently have a application which will display the time allocated to a user to perform a certain action. Currently it is simple, using a UILabel to display the time remaining.

I would like to add a bit of polish to the interface, and display a graphical countdown, which would be more compelling to the user.

I am not sure how to accomplish this, but my theory is as follows:
I know the maximum value that I count down from is 999. So I could create 3 UIImageViews to represent each digit.
A timer currently updates the remaining countdown value every second, which in turn sets the UILabel to the value. I could in theory, split this string into its component digits (or loop over the strings characters), and load a ‘digit’ image into the corresponding UIImageView based on the digit passed in.

My questions:

  1. Would the approach I mention be
    efficient?

  2. Is it the best approach given the
    situation?

  3. How could I animate the image change
    over? Ideally what I would like its
    the new image to slide in from the
    top of the image view, while the
    image it is replacing slides out
    from the bottom. Is this even
    possible?

Just to clarify, I am not looking for someone to write the code for me, just looking for a few pointers around my actual implementation.

Many thanks for taking the time to read this post.

EDIT, it appears that the post here How to animate the change of image in an UIImageView? helps me with animating the actual images. But I would still like to gain any suggestions on my proposed implementation.

  • 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-05-22T19:59:01+00:00Added an answer on May 22, 2026 at 7:59 pm

    Your basic approach is sound. Some things to keep in mind:

    For a countdown timer, don’t decrement the time left in an NSTimer. Instead, always use “now minus the start time.” NSTimer may not fire on schedule if the system is busy. Read “Repeating Versus Non-Repeating Timers” in NSTimer to understand how they work.

    For a problem like this, I like to name my files with names like digit0.png, digit1.png, etc. Then, you can load them like this:

    NSString *imageName = [NSString stringWithFormat:@"digit%d.png", digit];
    self.imageView.image = [UIImage imageNamed:imageName];
    

    +imageNamed: has its own caching, so this is quite efficient. Alternately, you can use an array of 10 images that you load early on and use objectAtIndex: to get the right one. I just usually do it with +imageNamed:.

    Sliding a new image in is no problem, but you shouldn’t use UIImageView for that. You should probably make a custom view with two CALayers that you load with the current and next image, and use a simple animation to slide from one to the other. Start with the Core Animation Programming Guide, and there are several tutorials around the web as well. This is an excellent small project for learning Core Animation.

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

Sidebar

Related Questions

I currently have an application which needs to have an awareness of which monitor
I currently have a functioning in-house Windows Forms application which extensively uses the DataGridView
I'm developing an application which currently have hundreds of objects created. Is it possible
We currently have developed an application using WCF. Our clients make connections to different
I'm writing an application which will display the current image seen by a camera
I have an application that I'm currently building that requires me to display a
I have a few C# .dll projects which are common to many applications. Currently,
I have a current system which is build as a Windows Application, and does
I currently have an application that gets hit with over 20,000 users daily and
Currently I have an application that receives an uploaded file from my web application.

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.