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

The Archive Base Latest Questions

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

Hello all I am working an iphone app where I need to show the

  • 0

Hello all I am working an iphone app where I need to show the current time in a watch That is there is a watch which displays the static time or static image . Then we need to find the current time then move all the hrs,mins ,seconds pins such tht they should set to their time.
Do u have any ideas to do this
Thanks Everyone
Here is my code:

//Calculate angles:
float minutesAngle = (0/60)*360;
float hoursAngle = (10/12)*360;

//Begin the animation block
[UIView beginAnimations:@"moveHands" context:nil];
[UIView setAnimationDuration:0.5];
minsImageView.transform = CGAffineTransformRotate(minsImageView.transform, minutesAngle);
hoursImageView.transform = CGAffineTransformRotate(hoursImageView.transform, hoursAngle);
[UIView commitAnimations];

where as minsImageView ,hoursImageView are the imageViews set in the XIB who shows the static image

But its not effecting at all..

  • 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-19T11:52:31+00:00Added an answer on May 19, 2026 at 11:52 am

    Once you have individual time values (it sounds like you’ve figured this out already) you can position your hands as needed.

    This means it’s time to brush up on your math skills. I think this’ll give you a start:

    A circle has 360 degrees in it. This means that for whatever time unit we get, we divide by the maximum value of that time unit to get a fraction and multiply the result by 360 (instead of 100 like a percentage) to get our number of degrees.

    So, if we had 23 seconds:

    23/60 = 3.8333
    3.8333 x 360 = 138 degrees

    Now we know how many degrees to rotate our object. I would get a designer to make you some nice hand images and put them in UIImageViews. Then, you can rotate them around their origins like so:

    secondHandImage.transform = CGAffineTransformMakeRotate(secondAngle);

    Good luck 🙂

    EDIT: Let’s assume that our hands are on 10:10. If we wanted to move them to 01:00 we would do something like the following. Tweak it as needed.

    //Calculate angles:
    float minutesAngle = (0/60)*360;
    float hoursAngle = (10/12)*360;
    
    //Begin the animation block
    [UIView beginAnimations:@"moveHands" context:nil];
    [UIView setAnimationDuration:0.5];
    minutesHand.transform = CGAffineTransformRotate(minutesHand.transform, minutesAngle);
    hoursHand.transform = CGAffineTransformRotate(hoursHand.transform, hoursAngle);
    [UIView commitAnimations];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello all, I am working with mysql & django. I need some time to
Hello all I am working in javascript and html5.I want to ask that how
hello all i have my splash screen which i want to show in landscape
hello all i am new to iphone development i am working on a application
Hello All and thanks ahead for any help I'm working on a website which
Hello all! I'm working on a prototype that would require me being able to
NOTE: Using .NET 2.0, and VS2005 as IDE Hello all, I'm working on logging
Hello all and thanks for the help, I need to write every row from
hello all I have a small dialog which I created dynamically, which has a
Problem Hello all! I have this code which takes my jpg image loops through

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.