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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:46:12+00:00 2026-05-28T18:46:12+00:00

I had asked this question once before but has had 0 attention and the

  • 0

I had asked this question once before but has had 0 attention and the person helping me has not responded in weeks, so please forgive me but I still do need help.

Im working with CGAffineTransformMakeRotation to flip a UILabel 180 degrees, I want the rotation based on UIOrientationPortrait and UIOrientationPortraitUpsideDown. I get 1/2 the result: when users flip to upside down (from portrait) the label transforms 180 and turns upside down as well (still facing the home button [Important])

BUT

when I rotate it back to Portrait the label stays in the flipped rotation state and does not stay with the home button. Thats what I need help with….

Here is the code i have:

#define degreesToRadian(x) (M_PI * (x) / 180.0)

...

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
    TranslateLabel.transform = CGAffineTransformMakeRotation(degreesToRadian(180));
}
  • 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-28T18:46:13+00:00Added an answer on May 28, 2026 at 6:46 pm

    You are rotating it upside down no matter what the orientation is. If you want it to rotate differently depending on the orientation, you have to do something like this:

    -(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
    {
      switch(toInterfaceOrientation){
        case UIInterfaceOrientationPortrait:
          TranslateLabel.transform = CGAffineTransformIdentity;
          break;
        case UIInterfaceOrientationPortraitUpsideDown:
          TranslateLabel.transform = CGAffineTransformMakeRotation(degreesToRadian(180));
          break;
      }
    }
    

    That way, it will rotate the label upside down when the device is upside down and it will return it back to normal when the device is on portrait orientation.

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

Sidebar

Related Questions

This question may have been asked before, but I had trouble finding an answer,
I had asked this question before, but I got no correct answer. So, this
I asked this question before but that time the issue was that I had
I asked this question before, but had a hard time showing which edits I
I know this question has been asked and answered before, but none of the
I asked this question before but with less information than I have now. What
Ok I had asked a question recently based on this. But I need to
I asked this question previously and thought I had it figured out but it
I had asked this question on Javaranch , but couldn't get a response there.
I have seen this question asked previously but can not find a clear explanation

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.