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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:52:59+00:00 2026-05-19T15:52:59+00:00

After the long time I spent getting an analog clock to work, I am

  • 0

After the long time I spent getting an analog clock to work, I am trying to make a digital one (sigh). I am trying to do this with 10 PNGs with the numbers 0 – 9. Each digit of the clock would be an image. The only problem with this is retrieving the certain digit from the current time. I’ve tried converting the time to a string and using the characterAtIndex, but that doesn’t seem to work. What would be the best way to get around this?

  • 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-19T15:53:00+00:00Added an answer on May 19, 2026 at 3:53 pm

    You could use NSDateComponents and NSCalendar:

    NSDate * date = [NSDate date];
    NSCalendar * calendar = [[NSCalendar alloc]
                             initWithCalendarIdentifier:NSGregorianCalendar];
    NSDateComponents * components =
                        [calendar components:(NSHourCalendarUnit | NSMinuteCalendarUnit) fromDate:date];
    
    NSInteger hour = [weekdayComponents hour];
    NSInteger minute = [weekdayComponents minute];
    NSInteger firstHourDigit = hour/10;
    NSInteger secondHourDigit = hour%10;
    NSInteger firstMinuteDigit = minute/10;
    NSInteger secondMinuteDigit = minute%10;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(Sorry if this is a dupe) I've just spent a long time trying to
I've spent a long time building stochastic simulations in Java. They work great, but
Returning to WinForms in VS2008 after a long time.. Tinkering with a OOD problem
Well, after a long time writing .net programs in C# I started to feel
My work place recently started a SOA initiative. After a year-long examination of the
I have worked in project for long time but after electricity has cut off
I'm developing a LoB application in Java after a long absence from the platform
How long will it take to enroll in the iPhone developer program after paying
Is there any way to split a long string of HTML after N words?
After reading this question , I was reminded of when I was taught Java

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.