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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:53:01+00:00 2026-06-02T05:53:01+00:00

there is all this…. – (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation { if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)

  • 0

there is all this….

- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation {

if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
    return (interfaceOrientation != UIInterfaceOrientationPortrait && interfaceOrientation       != UIInterfaceOrientationLandscapeLeft && interfaceOrientation !=      UIInterfaceOrientationPortraitUpsideDown);
  } else {
    return YES;
}
}

and i want the accelerometer to work in landscape as if it was in portrait… I have all the accelerometer stuff such as:

- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration*)acceleration {
   accx = acceleration.x;

}

also i have tried looking at other questions but i can’t find the solution…?

  • 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-02T05:53:02+00:00Added an answer on June 2, 2026 at 5:53 am

    Ok, if understood correctly, you are in portrait (in the X axis direction see the image), tilt right and tilt left then the image in your app should move right and left. Then you switch to landscape and your image should now move right and left but it doesn’t, the axis you should pay attention now is the Y axis.

    There is no reason why you should not be seeing any change in the Y axis when you rotate to landscape, unless there is hardware damage and that the accelerometer had stopped working.

    iPhone Accelerometer

    Now, what you ask for is a way to reset the accelerometer so that you can keep reading from the X even though the changes are happening in the Y axis? No, there is no way to do this, unless you write an extra method … something along the lines of:

    +(UIAccelerationValue)fixedAccelerationValue{
        //Check which axis you should look for
        if ( [[UIDevice currentDevice] orientation] == UIInterfaceOrientationPortrait || [[UIDevice currentDevice] orientation] == UIInterfaceOrientationUpsideDown ){
            //read from the x axis
        }
        else{
            //read from the y axis
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to all this, but here goes: There is an apple file
Is there any way to combine all of this to reduce the amount of
I get this error all the time. And as I can see, there are
I've been trying to figure this out all morning. Is there a way to
Is there better way to enumerate all photos on the device than this one?
Is there a way to create a condition like this? @products = Product.find(:all, :limit
for this site: http://yoursdproperty.com/ do you see how there some extra white space all
All, there are many question on the above topic but I believe this is
How to center a div across all browsers and behind this div there should
Is there a simple way of generating a new Route-URL without all this faff.

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.