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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:46:06+00:00 2026-06-02T08:46:06+00:00

When autorotating, I set GAME_AUTOROTATION = kGameAutorotationUIViewController and #elif GAME_AUTOROTATION == kGameAutorotationUIViewController return (

  • 0

When autorotating, I set

GAME_AUTOROTATION = kGameAutorotationUIViewController

and

#elif GAME_AUTOROTATION == kGameAutorotationUIViewController    
    return ( UIInterfaceOrientationIsLandscape( interfaceOrientation ) );

This means that if I hold the device in either landscape orientation it will autorotate. The thing is, the rotation is always shifted by 90 degrees (ie when I rotate to landscape right I get portrait).

How do I go along in fixing 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-06-02T08:46:08+00:00Added an answer on June 2, 2026 at 8:46 am

    The correct way to set GAME_AUTOROTATION is this:

    #define GAME_AUTOROTATION kGameAutorotationUIViewController
    

    (I have mine in GameConfig.h.)

    I can’t make sense of GAME_AUTOROTATION = kGameAutorotationUIViewController, so just thinking this could be the cause of the problem (if you used it like that).

    In any case, if you still have problems with autorotation, set a breakpoint in willRotateToInterfaceOrientation and inspect what happens from there; same with willAnimateRotationToInterfaceOrientation.

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

Sidebar

Related Questions

I need to detect when the device is in portrait orientation so that I
I have a game that uses the accelerometer to move the player. For this
When autorotating to Landscape mode the size of my UIWebView changes perfectly, only the
This question is about iOS device rotation and multiple controlled views in a UINavigationController.
Why is UINavigationController AutoRotation not working on the Device? How can I set auto
I've learned that the best way to get graceful rotation is to set the
I am drawing a view on the iPad that only supports landscape orientations, however
I've recently added landscape autorotation to my iPhone navigation based application, however I'm having
There has been a lot of confusion and a set of corresponding set of
I have this view controller with the following hierarchy: I am just trying to

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.