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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:18:07+00:00 2026-06-10T08:18:07+00:00

Hi I have a UIImageView which is part on, part off screen. I want

  • 0

Hi I have a UIImageView which is part on, part off screen.

I want to rotate the view around a point off screen (the center of the view.)

How do I do this?

fullRotationAnimation           = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
    fullRotationAnimation.fromValue= [NSNumber numberWithFloat:0.0f];
    fullRotationAnimation.toValue   = [NSNumber numberWithFloat:2 * M_PI];
    fullRotationAnimation.duration  = 4;
    fullRotationAnimation.repeatCount = 1;
    [self->greyRings.layer addAnimation:fullRotationAnimation forKey:@"360"];

I’m using that code at the moment but it just spins it around the center of the screen.

Any ideas please?

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

    Using block animation:

    - (void)rotateImageView:(UIImageView *)imageView aroundPoint:(CGPoint)point byAngle:(CGFloat)angle {
    
        CGFloat sinA = sin(angle);
        CGFloat cosA = cos(angle);
        CGFloat x = point.x;
        CGFloat y = point.y;
    
        CGAffineTransform transform = CGAffineTransformMake(cosA,sinA,-sinA,cosA,x-x*cosA+y*sinA,y-x*sinA-y*cosA);
    
        [UIView animateWithDuration:4.0 animations:^{
            imageView.transform = transform;
        }];
    }
    

    Note that angle is in radians, so a full rotation is 2.0*M_PI.

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

Sidebar

Related Questions

My problem is this - I have a UIImageView which a user can rotate
In my UITableViewCell I have UIImageView which i want to rotate for 180° every
I have an UIImageView which I can rotate using CABasicAnimation . That works fine.
I have an UIImageView which I want to rotate a little bit, but I
I currently have a UIImageView which I can move/drag around the view. How does
I have a view with two subviews: A UIImageView A small Custom View which
I have a UIScrollView which contains multiple UIImageViews. I want to know which UIImageView
So I have an UIImageView which can be rotated about its center with touchesMoved.
I have a UIImageView which is in an animation loop. I want to detect
I have a UIImageView which gets rotated. When it rotates to the point where

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.