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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:02:33+00:00 2026-05-23T13:02:33+00:00

I need to rotate by a given angle a UIImageView created by Interface builder

  • 0

I need to rotate by a given angle a UIImageView created by Interface builder when the view is loaded.

- (void)viewDidLoad
{
   [super viewDidLoad];
    image.transform = CGAffineTransformRotate(image.transform, REF_INIT_OFFSET*M_PI/180); 
}

This rotates the image but the latter is totally distorted and stretched. If REF_INIT_OFFSET is a multiple of 90 it works fine !

Here is how the picture should look like (note the needle pointing to the “0”)

enter image description here

and here is how it actually looks:

it looks like the image is stretched into a wrong direction.

Do you have in idea what’s wrong ?

thanks,

  • 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-23T13:02:34+00:00Added an answer on May 23, 2026 at 1:02 pm

    Not sure that it help you, but I had the same problem after [UIImage setFrame:] if UIImage was transformed , the decision was using setBounds instead of setFrame

    Solving the problem on the discussion in the comments:

    Method setFrame is called after viewDidLoad in shouldAutorotateToInterfaceOrientation implicitly if autoresizesSubviews property YES

    - (void)viewDidLoad {
    [super viewDidLoad];
    self.view.autoresizesSubviews=NO;
    image.transform = CGAffineTransformRotate(image.transform, 50*M_PI/180);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to be able to rotate an image around a given point so
I need to rotate in image multiple times in 90 degrees I am using
I need to rotate an image when the user do a two finger twist
What do I have to do, if I need to rotate a UIImageView ?
I need to write a program that uses matrix multiplication to rotate an image
I need to create a function to rotate a given matrix (list of lists)
I have a point in a rectangle that I need to rotate an arbitrary
I need a way to allow each letter of a word to rotate through
In red-black tree, when rotate, you need to know who is the parent of
I need to rotate a table clockwise up to 90 degrees. It's one of

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.