IPhone auto rotation problem

I am trying to create an app with multiple views. I have a seperate nib file and view controller for all the views. I have created methods in the app delegate that call up the different views as well as add a transition. I then call that method from the view controller subclasses. My problem is that I want the device to only support landscape mode in some views, and portrait in the others. I modified the -BOOL should autorotate to interface orientation, but, the only view that rotates correctly is the first view loaded. The subsequent ones launch in portrait mode and will only flip into landscape if the device is rotated into portrait then landscape, and sometimes I have to repeat this. Am I missing something here?

I guess I'll need to build a test bed to be of any more help. I still suspect this project would be easier for you if you changed your app's structure to use a single root view that remained over your window for the life of the program. In fact, the Utility template might be a good starting point for you. You might use the MainView for your splash screen, and the FlipsideView for your GameView, replacing the info button with whatever is calling exitSplash and removing or modifying the FlipsideView's Nav Bar depending on where you want to go from the GameView. Per my previous thread, using the Utility template with landscape views has its own set of problems, but at least the comments in my thread would then apply, and others could help you without building a test bed from scratch. In particular, you might want to try xnav's suggestion to start with the Tab Bar Application template which you'll find near the end of that thread.
One more snippet of code that might be useful to you:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
UIView *rotatingView = rotatingViewController.view;
return [rotatingView superview] != nil ? YES : interfaceOrientation == UIInterfaceOrientationPortrait
|| interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown;
I put the above in my RootViewController.m so that only one of its subviews would rotate into landscape orientation. To avoid using the undocumented setOrientation method of UIDevice, I then ensured that users could only switch away from the rotatingView when the device was in portrait. Of course if you choose to use setOrientation, that would offer you even more flexibility.
Best of luck on your app!!

Similar Messages

  • [iPhone] auto-rotation problems

    I'm having a really tough time getting auto-rotation to work properly.
    My biggest problem is most of my application only works in Portrait mode, but there is one view (with subviews) and a controller that handles landscape (it displays an image). When I rotate the device to landscape mode while this view is up, then cause this controller to pop back to the previous controller (a navigation controller), the rest of the interface is now in landscape mode instead of portrait, which is messing up my other portrait only views. I expected that popping my landscape-supporting controller would revert the interface to portrait, since none of the other controllers support landscape.
    Anyone know what I'm doing wrong?
    And is there a way to "force" the device into landscape mode when a landscape image is selected? See I have a image picker controller (portrait), and when I pick a landscape image I'd ideally like to just have my image viewer (and subviews) show up in landscape mode - like how Movie Player does it.
    I know this is possible, but I haven't figured out how yet.

    I am having the same problem that you have descibed below. Did you ever find a solution? I have tried all types of possible solutions but cannot get the previous view to revert back to portrait as well.

  • Can you turn off iPhone auto-rotate?

    Can you turn off iPhone auto-rotate? I never used my phone sideways at all, and now emails and text messaging keeps rotating side ways at the slight angle my phone goes in. Its been really bothering me ever since updating to the 3.0 OS and I want to downgrade to stop this auto rotation.

    As these two say, you are going to have to try really hard to keep that phone upright.

  • Iphone 6 rotating problem

    My ipone6 has rotating problems with for example the calendar app, somtimes it's working but most of time I can't rotate the screen.
    When is this going to be solved, as I many people are complaining about this?

    Try to reset the phone by holding the sleep and home button for about 10sec, until the Apple logo comes back again. You will not lose any data by resetting, but it can cure some glitches.
    If this does not help, setting it up as new device would be the next step:
    How to erase your iOS device and then set it up as a new device or restore it from backups
    Or, if you want to use your computer and iTunes instead:
    Use iTunes to restore your iOS device to factory settings - Apple Support
    If setting it up as new device does not bring back the full functionality of your brightness settings, get the phone checked by visiting an Authorized Apple Service Provider, Apple Store or contact Apple Support to have it serviced:
    iPhone - Contact Support - Apple Support

  • Auto Rotate problems when shooting tethered overhead

    I am shooting with a Canon 5d mark 2.  When I shoot product into the auto rotate works properly and the image appears rotated properly. Although when I shoot overhead or down on product it seems to get confused. If I rotate the camera twords the horizon and fire it figures out which way it should be the I can reframe my overhead shot.  But if the camera is moved at all it will show up rotated the wrong way and I have to slightly move the camera away from its directly overhead framing again so it can figure out wich way it should be rotating. I have tried all three rotate modes with the camera with similar inconsitant results. What is the best setting on the camera to get consistant results. Or ii I turn auto rotate off is there a way to tell lightrroom to rotate it properly on import like it does for all other settings like white balance.

    This isn't a function of tethering, I wouldn't think. Many cameras have a sensor that determines the orientation of images so auto-rotate works. The problem is that these sensors generally only work along one axis, using the force of gravity to tell them where down is. When you orient the camera such that the lens is pointing down most sensors no longer are able to determine whether you are in portrait or landscape, because there is no down -- it ends up being somewhat random.
    I've seen this on many different cameras, and all without tethering. It has to do when the sensor is read when composing the short.
    Your best bet is to set the camera to ignore the sensor when taking pics like this, and rotate the image by hand that are need to be in portrait. If there is no rotation in the image metadata, Lr will not rotate it. It will have to be done by hand. It won't be that hard to select a number of images and bulk rotate them.

  • 5800 - Does new firmware fix auto-rotate problems ...

    Ever since V 50.0.005 I've had problems with auto-rotate stopping working after a while (memory leak anyone ?) with a reboot being required to fix it. DAK if this is fixed in V 51.0.006 because if it is I'll go through the hassle of changing my product code to get it early as it's driving me nutzzzzz.

    The real issue lies somewhere else.. atleast thats what I think because I did not face such problem on my Nokia 5800 xm with v  50.0.005. It was happenning just occassionaly and not so frequently or permanently as some posts suggest. 
    Auto rotate should work perfectly when the phone is held vertically.i.e. the top and bottom edges at same distance from the body.. Normaly when the phone is held in palm the bottom edge is nearer than the top edge as it is slanting. The feature will not work 100% in this condition...
    --------------------------------------------------​--------------------------------------------------​--------------------------------------------------​--If you find this helpful, pl. hit the White Star in Green Box...

  • Auto rotate problems

    Suddenly I cant get my screen to work sideways, any one know how to get it to auto rotate please?, Suddenly I cant get my screen to work sideways, any one know how to get it to auto rotate please?

    Double tap home buttom. Slide bottom bar to right. You will see a box with a rotating arrow. Click on it. It will unlock and allow rotation.

  • Auto-rotate problems :l

    l got my iphone 2 weeks ago and so far it hasn't been haaving any problems, but today l was texting and the screen turned landscape, l could not get it to return to normal. Same with everything else, safari, facebook, notes, even the calculator .
    l had to turn on the lock screen thing, but l really dont want to have to turn it on and off eveytime l want to look at something in landscape. Someone help?

    Easiest thing you should do is give it a system restore. This will fix it if it's a software problem. If it doesn't respond after the system restore, take it into apple since that means theres a problem with the hardware.
    Just to clarify, you have portrait orientation lock off right?

  • Iphone screen rotation problem

    My Iphone5 rotation stopped wkg. I have double clicked and swiped to the right at the bottom icon area to get the lock/unclock icon to appear but it will not. Help

    There is a different way to lock the orientation in iOS 7:
    Locking Orientation

  • Hi all, I have update my ipad 2 to ios7.0.3 and have facing with auto rotate problem also my restart button not working. Any help would be good.

    Playing a game is no good when I can't slide or rotate this ipad. Can any one help me.
    Tahnks,

    Have you tried this:
    (A) Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.
    (B) Reset all settings
    Settings>General>Reset>Reset all settings
    Note: Data will not be affected but settings will be reset.

  • Auto-rotate stops working, accellerometer is working fine?

    Last night, I noticed that autorotate in
    - Mobile Safari
    - Coverflow
    - Photos
    on my iPhone are is/are no longer working. I was worried that the accelerometer might be broken, but I tried two games that make use of the accelerometer, and both are working fine - Marbles and Labyrinth. I haven't installed anything new since the last time I noticed it working - I think I've set up two imap accounts, and modified my EDGE network setting since, but no new apps.
    Has anyone seen this problem? Are any jailbroken apps causing this? I've read about various "auto rotate" problems in these forums and elsewhere online in the past, and it's always assumed the accelerometer is no longer functioning, but as mentioned, it's working fine in some apps that make use of it, so it appears to be a software issue / bug. I will most likely send mine in for service / replacement, but before I do, I was wondering if anyone has any idea or reference about this being a software glitch. I haven't done a restore yet, just wanted to see if it's a problem anyone's seen yet.

    I am having the same issue in Safari in a never jail-broken phone. I can launch Safari and when I rotate the phone horizontally, the screen remains vertical. I have been able to get it to rotate on a rare occasion, but then it will not rotate back to vertical unless I exit Safari and reopen it.

  • Nokia x auto rotation

    auto rotation doesn't work after software updates even ifthe feature is turned on. 

    For Nokia X with auto rotation problem.
    Install Adaptive Rotation Lock - Installed complete - open - setting
    chose Force Auto...auto rotate absolutely worked !!!

  • How im suppose to fix the auto shutdown problem in my iphone 3gs after updating to ios 5.1.1 this problem has made me a mobile ****** in my house and an loser in thing care so if any solution to this problem let me know

    how im suppose to fix the auto shutdown problem in my iphone 3gs after updating to ios 5.1.1 this problem has made me a mobile ****** in my house and an loser in thing care so if any solution to this problem let me know

    What "auto shutdown problem" are you talking about?

  • IOS 8.3 and the auto rotation of the screen problem?

    I upgraded to IOS 8.3 and the auto rotation of the screen has stopped working on my iPad Air 2, has anyone else got this problem?

    By Control Centre I meant swipe up from the bottom of the screen to bring up Control Centre.  In there you will find the rotation lock symbol (a padlock with a circular arrow round it).  Make sure that is turned OFF

  • N82 Auto Rotate (Accelerometer) Problem !

    Anyone has problem with auto rotate? My N82 its kinda very hard to auto rotate. I do know it will not rotate on stand by screen and only rotate anti clock wise. The phone is just 2 weeks old, the auto rotate just work fine for the first week. Suddenly i notice when i rotate the phone, the display won't rotate. I need to shake the phone very hard then it will rotate. At first i think maybe its because by 3rd party application, so i decided to upgrade the firmware so it will remove all data and fix the problem. But there were no upgrade available, so i decided to reinstall the firmware. After done reinstall the firmware, i found out the problem still there. Than i remember that N82 will preserve all user data. So the 3rd party apps still there. So i remove all the apps manually and then restart the phone. But the auto rotate still had the problem. So i think maybe its related to memory because i restore all the messages and contacts from my old N73. So i delete all the messages and contacts and restart the phone, but still the same. Than i call NOKIA helpline to ask about the problem. They suggest me to full format without preserve user data and only NOKIA care center can do that. So the next day i went to nearest NOKIA care center to get my phone full format. But after almost 2 hours waiting, i collected my phone and get it tested there. But the auto rotate still problem. I so frustrated, so i ask the technician there about the problem. They said its work fine when they just finished format it. They said maybe its hardware problem. They ask me to go to the HQ b'coz they do not have the tool and parts to repair it and it will took ages to wait. So then again the next day i went to HQ to get my phone checked. I arrived there around 5pm. They say, its kinda late and i need to leave my phone there to get it checked. They said if i came earlier i can get my phone checked and fixed within the same day. So, i leave my phone there and they kinda promise me that my phone will get fixed the next day. The next day before i go to pick up my phone i call them to check the status off my phone, they said they haven't check my phone yet. It's already 2PM, and i ask when my phone will get fixed, they said they cant be sure and they will call me later. After done talking with them, i get dressed and drove there to ask personally about my phone. I cant wait any longer. I just bought the phone only for 2 weeks and haven't finish and bored played with it yet. So i arrived there around 3:30PM. So i ask them about my phone, they said it cant be done by today because they already had my phone disassembled and need to wait for the parts. When i heard about my phone had been disassembled, my heart it like had been crushed. There goes my money, i felt so frustrated and its just a waste of money to buy that phone. They didn't even bother to replace the phone and get me to wait and for how long i don't even know. And now i am so **bleep** off after they had wasted my MONEY / TIME / ENERGY / EFFORT.
    I am still waiting from NOKIA about my phone and like to know if any of you guys here had the same problem?

    I do not fully understand the word "lethargic". I know its not will be perfect, but my N82 do not auto-rotate at all. Like i said, i need to shake it very hard to make it auto-rotate. If its only me, why NOKIA has to disassembled the phone and replace the motherboard. Thats what make me felt frustrated. I just bought the phone for 2 weeks. The phone its not cheap, and i am not rich you know.
    About going or taking it to service center. Its not i don't like to go there or their service is bad. The thing is, i have to go there 3 times and still my phone don't get fixed. And then i need to wait and i do not know for how long i must wait. Again, like i said. My phone is new and only 2 weeks old. I don't get to play much with it and had to send for service. Why don't they just replace the phone with new one. I still have other work to do other than going to service center.
    Again, again and again. Why i must do all this for a new phone?
    I think anyone will agree with me about this.

Maybe you are looking for

  • Vendor Account group assign recon. account

    Hi Experts, I'm looking tcode to assing recon. account for vendor account group. I created Vendor account group and recon. account. I would like to have in tcode fk01 assing Vendor account group to recon. account. Now in tcode fk01 I choose vendor ac

  • XML-comments not allowed in IDOC_AAE-Adapter?

    Hi, we have a File to IDOC scenario and are using the IDOC_AAE adapter for sending IDOCs to the SAP system. In our mapping we have added some comments into the XML-IDOC-structure. By sending the document to the SAP-system we are getting the following

  • Function Keys are not working on my Satelite C50-A-1DV

    Hi, I just installed a bios update (1.30) and right after I noticed I was unable to adjust the brightness of my screen via the special keys (F2 and F3). Also, I am unable to use the Synaptic pointing device toggle (F4), monitor selection (F5), Mute (

  • Exception Handling : Memory Leak???

    Hi all I have a problem in my system.It use radius-ldap for authentication and insert accounting to Oracle DB.In accounting table,I put a trigger with using an exception handling to update or insert some data to other tables in Oracle schema and ldap

  • OEM GC Move repository with hot backup metanote 602955.1

    Hi all... I get maaaaadddddd.. Yesterday I correctly move the repository from my old Grid to the new one. I used the metalink note: 602955.1 After I finished I wasn't lucky about way and documentation. I conclude to repeat the process. 1. At the firs