Iphone device orientation

Hi,
I am facing strange problem with UIDevice setOrientation method and I will really appreciate if someone could solve this problem.
I am navigating between two view controllers thru push and pop. Screen A is list of image series and Screen B display images in scrollview of that series. For a particular series I want to show images in landscape mode so I use
Code:
[[UIDevice currentDevice] setOrientation:UIDeviceOrientationLandscapeLeft];
in viewDidAppear method of Screen B.
This works fine and Interface is rotated to landscape. Please note device is still held as portrait.
Now if I go back to screen A by "POP", Screen A is displayed as landscape orientation, device is still in portrait. Although shouldAutorotateToInterfaceOrientation method return true on A screen then why it is not rotating to portrait, since device is held as portrait.
shouldAutorotateToInterfaceOrientation on screen B restrict the interface orientation to landscape.
I have spent more than two days now to solve this out but couldn't find a solution. plz help.
Thanks in advance.

I'm not sure what you may be doing wrong. In my apps, I generally lock down one orientation, but after seeing your post when I next looked at the UIViewController Class Reference which you can reach by right-click or control-click on any UIVuewController class or method name in your code and select find in API reference,
I found this:{quote}Handling View Rotations
By default, the UIViewController class displays views in portrait mode only. To support additional orientations, you must override the shouldAutorotateToInterfaceOrientation: method and return YES for any orientations your subclass supports. If the autoresizing properties of your views are configured correctly, that may be all you have to do. However, the UIViewController class provides additional hooks for you to implement additional behaviors as needed.
To temporarily turn off features that are not needed or might otherwise cause problems during the orientation change, you can override the willRotateToInterfaceOrientation:duration: method and perform the needed actions there. You can then override the didRotateFromInterfaceOrientation: method and use it to reenable those features once the orientation change is complete.
If you want to perform custom animations during an orientation change, you can do so in one of two ways. Orientation changes used to occur in two steps, with notifications occurring at the beginning, middle, and end points of the rotation. However, in iPhone OS 3.0, support was added for performing orientation changes in one step. Using a one-step orientation change tends to be faster than the older two-step process and is generally recommended for any new code.
To add animations for a one-step orientation change, override the willAnimateRotationToInterfaceOrientation:duration: method and perform your animations there. To use the older two-step method, override one or both of the willAnimateFirstHalfOfRotationToInterfaceOrientation:duration: and willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration: methods to configure your animations before each step. You must choose only one technique and override just the methods associated with that technique. If you override either method associated with the two-step technique, the view controller uses that technique by default.
{quote}
My take on that is that you may need to play around with overriding willRotateToInterfaceOrientation:duration and didRotateFromInterfaceOrientation.
These and some of the other available methods are not in the standard templates and you have to add them yourself. I'd say take a good look at the docs again and see if it explains the behavior you are seeing and then make your changes one at a time and see what changes.
I've learned the hard way that making a bunch of changes to something that worked and finding which thing broke some behavior is really hard unless you know exactly what set of changes will affect a specific behavior.
Let us know if this helps.

Similar Messages

  • [iPhone] How to get current device orientation...

    Again, Should be simple, but I am having trouble finding a way to poll the device to get it's current orientation. That is, where the status bar would be drawn if there is one. I see notifications for changes, etc.. but sometimes I want to check the orientation of the device NOW.
    thanks in advance for the pointers.
    michael golden

    Search bar in Docs is sad
    Getting the Current Device Orientation
    orientation property
    generatesDeviceOrientationNotifications property
    – beginGeneratingDeviceOrientationNotifications
    – endGeneratingDeviceOrientationNotifications

  • Apple ID appearing on another iPhone device (Sync confusion)

    Issue
    iTunes is sporadically requesting access to my partner's Apple ID account when downloading applications and trying to install the other iTunes account applications also when syncing takes place within iTunes. System software/accounts seems confused.
    How can I ensure that both devices remain separate and do not access each other's iTunes accounts or sync over Mac logins? How can I delete mixed applications from separate Apple ID's ensuring it won't replicate the deletion on the primary Apple ID?
    Background
    1 x Macbook Pro OS 10.8.2
    iTunes 11.0.1
    App Store 1.2.1
    1 x iPhone 4S OS 6.0.1 (Device A)
    1 x iPhone 4 OS 6.0.1 (Device B)
    Separate Apple ID's
    Separate iCloud accounts
    iTunes accounts
    Both people have our own iTunes accounts linked to their own device. All details are currently correct when checking Apple ID profiles.
    MacbookPro
    Both people have separate MacBook Pro logins and software is all up to date.
    History
    In the past, over a year ago, both iPhone devices were sync'd via the same iTunes and Macbook log in. (Not a good start I know) Both iPhones always had their own iTunes account for downloading apps and music etc. When I realised I was syncing application data from one iPhone to the other on my Macbook, I created two Macbook log ins. I deleted all applications on Device B that were transferred from Device A and also deleted the applications in Device B's iTunes account. It seemed that both devices finally had seperated, retained their own Apple ID logins, applications and Macbook user logins.
    Device B recently tried to install an application that Device A also had.
    The application installed onto Device B without an issue and there was no confusion with Device A having the same application. The application can be upgraded to provide additional functionality. When Device B requested this within the application to upgrade, the Apple ID of Device A suddenly appeared.
    I checked that Device B was asked to INSTALL the primary basic version of the application rather than OPEN it, just incase the confusion started at this point. It definitely said INSTALL.
    I thought the divorce was done and dusted in the past.
    Why would Device B suddenly point Device A's Apple ID?
    To troubleshoot, I connected Device B to iTunes on the MacBook with Device B's Macbook log in. When iTunes opened within the Apple ID of Device B ALL DEVICE A applications appeared and started to sync these applications to Device B! I am back to mixed accounts.
    How can ITunes suddenly connect the Apple ID's of both accounts and then tell Device B it needs to install Device A's applications? They are separate Apple ID accounts, separate copyright, separate costs.
    I know with iMatch that you can share the library with another device and when this occurs it locks the Apple ID of the primary iTunes account for 90 days on secondary device. We have never done this.
    I'm 'Syncing' trying to work this one out, please help!

    Steve324 wrote:
    s there a solution to get things
    back the way it was before the install?
    Thank you!
    See my previous suggestions

  • Iphone 4 since upgrade to ios 5.1.1 no longer works with made for itunes, iphone devices.

    Ever since I upgraded to IOS 5.1.1 my Iphone no longer works for playing music thorugh my Apline car unit, My Logic 3 clock radio, and a Next made for ipod device.
    I can sync through ITunes on the PC and can also play videos through the HDMI adapter.   My wifes iphone 4s and the kids  hand me down iphone 3s still play fine through these made for Itunes , Ipod , Iphone devices.
    I want to downgrade back to the prior IOS  I had before Apple encouraged me to install this bugged one.   How do I go about getting a legit non jailbroken prior IOS version installed on my Iphone?
    Is Apple aware of this issue , as I have seen blogs about this it is affecting other people?   Will this issue be resolved with ios 6?
    Can I get the beta ?
    Thanks,
    Douglas

    Agreed. Same thing here. Just bought a late model Alpine INE-S920Hd and it is all kinds of broken. I think this is happening because Apple shifted the music and video. Totally buggy. Bluetooth refuses to work properly, too. A2dp keeps stealing the audio from Pandora in the Alpine interface. The ipod controls dont work at all.

  • I lost my iPhone device, how can I get my data back on another one without using an iCloud backup just back up on i Tunes, Please Help.

    I lost my iPhone device, how can I get my data back on another one without using an iCloud backup just back up on i Tunes, Please Help.??

    You can find the backup files and then copy them to a safe place if you are worrying about this.
    iTunes places the backup files in these places:
    Mac: ~/Library/Application Support/MobileSync/Backup/
    The "~" represents your Home folder. If you don't see Library in your Home folder, hold Option and click the Go menu.
    Windows Vista, Windows 7, and Windows 8: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
    To quickly access the AppData folder, click Start. In the search bar, type %appdata%, then press Return.
    Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    To quickly access the Application Data folder, click Start, then choose Run. In the search bar, type %appdata%, then click OK.

  • HT204053 Can I search or locate different iPhone devices using one apple ID?

    Hello!
    Can I search or locate different iphone devices using one apple I.D.?
    Thanks!

    You can only use Find My iPhone for accounts that you can log into.  If you and your neighbor have different IDs and you only know your ID, than you can only track devices attached to your account.

  • In iTunes the iPhone device icon will not show up whenever I plug in a USB into my PC but the iPhone icon will show up in 'This PC'  so if anyone who knows a resolution to my problem with my iTunes or PC,it would really help me.I need at least Help or Tip

    In iTunes the iPhone device icon will not show up whenever I plug in a USB into my PC but the iPhone icon will show up in 'This PC'  so if anyone who knows a resolution to my problem with my iTunes or PC,it would really help me.I need at least Help or some Tips.I have already tried many things to iTunes and my PC like trying to restore my PC but that do anything.Also,would it be fine if i contacted (call) Apple Support? Please,I need help because what I think is wrong is my PC,iPhone,or USB might be messed up so if anyone could help me with this,it would be really helpful and for anyone to be nice enough to help me.

    I think this article will help you.

  • My iPhone device no longer recognized in iTunes.  What can I do?

    My iPhone device no longer recognized in iTunes.  What can I do?

    I just did a reset and that fixed it. You know how to do a reset? Hold the home and off buttons down at the same time unitl it goes off and then comes back on again. Then let them go. Try it. It worked for me.

  • TS1538 my iphone device not recognized in iTunes for my new Windows 8 computer

    my iphone device not recognized in iTunes for my new Windows 8 computer

    Hello kwesiaddai,
    I understand that your iPhone 5 is not recognized by iTunes. The following article may help to resolve your issue:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    Thanks,
    Matt M.

  • I just installed itunes 11.1.5.5.  Now the format in Itunes is changed.  when I am trying to add music to my iphone, there is no longer an add button under the Iphone device.  Why did they have to change this?  Can anyone help, Im tryiong to add music.

    How do you add musci to the Iphone?  I just installed itunes 11.1.5.5.  Now the format in Itunes is changed.  when I am trying to add music to my iphone, there is no longer an add button under the Iphone device.  Why did they have to change this?  Can anyone help, Im tryiong to add music.

    Correct.  When you purchase devices, they would have stated the OS they needed to work, on the box.  This can be overlooked, but it is very important to check when purchasing. 
    You current OS, is so old, that they technology build into the new devices, is not something your OS understands.  It didn't exist when your OS was created, and therefore you need to upgrade the OS to work with the newer technology of these devices.
    10.6 software is not downloadable.  You must purchase a DVD disc.  You can order it from the on-line apple store
    - http://store.apple.com/us/product/MC573/mac-os-x-106-snow-leopard.

  • ITunes no longer shows 'Podcasts' item under iPhone device section.

    Stats:
    iPhone 4 (32GB)
    iOS version 4.3.3
    iTunes for Windows 7 (64-bit) Version 10.3.1.55
    I have iTunes set to manually manage my music and podcasts. Previously I had done this by clicking on the "Podcasts" item under the iPhone device section. Here I would delete podcasts I had previously listened to and drag new podcasts from the "podcasts" item under the Library section. As of today, when I connect my iPhone to my computer, it no longer lists a "podcasts" item under my iPhone in the Devices section.
    Now I can't fine a place to delete old podcasts. I also do NOT want to use iTunes sync function for podcasts. Anyone else having this issue?
    -Mike

    Just found out. You select the podcast page on your iPhone 4. You drag your finger, from right to left, over the screen, just like you do to delete e-mails. The delete option will present itself. Touch the delete button and confirm. The podcast will be deleted.

  • IPhone Device is not specified in Windows 7 after update to iOS 5

    After i updated my iPhone to iOS 5, my iPhone device become unspecified. However, my iTunes still able to detect my iPhone and sync with no problem.
    Another thing is my iPhone icon disappear and become a weird device, and it shows Apple iPhone instead of my phone's name.
    I have tried:
    1) Completely uninstall and reinstall iTunes and relevant apple software by following below step
    http://support.apple.com/kb/TS1538
    2) Restart PC
    3) Restart my iPhone
    4) Hard reset my iPhone
    None can solve my problem, please help!

    No solution?

  • I'm trying to register my iphone device through itunes

    I'm trying to register my iphone device through itunes but it is asking to fill in the Zip Code but there's no such thing in the form to fill in.
    here's the screenshot http://prntscr.com/33ae51

    It's not necessary to register your iPhone.
    Read here >  Do I need to register my Apple product?

  • Iphone device is not appearing in iTune

    hi,
    my iphone4  device is not appearing in itune.  i have uninstall and install twice, using latest version10.4
    others thing working for iphone but device is not locating on itune. i have checked going in device manager
    where its showing iphone device and working properly. its working with other system but here in my acer vista 32 laptop not working.
    can anyone help me out to get rid of it. i have tried all possible way and the troubleshoot guide still unable to overcome on it.

    Did you also check your security software settings? (copied from iOS: Device not recognized in iTunes for Windows) http://support.apple.com/kb/TS3125

  • Missing Thumbnails in iPhone Device Library in iPhoto

    Hi guys,
    How do i remove those stubborn missing thumbnails from my iPhone device in iPhoto?
    I have new pictures in my iPhone camera roll that aren't reflected here in my iPhoto when i synced it with iTunes.
    Do i need to clear any cache or something? if yes, how?
    thanks in advance!
    Attached is a screenshot of the problem;
    http://img199.imageshack.us/img199/8184/screenshot20100225atam1.png

    i have solved the issue.
    Restart my mac and it's done
    thanks!

Maybe you are looking for

  • How to view pdf in 5700

    hi how to view pdf file in 5700?

  • I bought an iphone4s before my carrier put my sim in it i updated itunes now wont work with my sim

    I bought an iphone4s before my carrier put my sim in it i updated itunes now wont work with my sim

  • Create Letter after applicant has been created WS00400019

    Hello, Firstly i would like to find out if it is possible for this subworkflow to be processed in the foreground, because when it is executed it gives me an error stating that "Error when defining successor for node 0000000004. I've checked the bindi

  • S60 homescreen

    The next top mobile phone companies next to nokia like samsung and lg are already upgrading there homescreen with 3D effects. But nokia is still on a static homescreen, why is that? I meant about statis homescreen is that, the homescreen doesn't prov

  • Upgrade OS on old Macbook Pro

    I have an old Macbook Pro2,2 15" with an Intel Core 2 Duo, 2.33 GHz processor and 4MB of memory.  I only need to use it occasionally but would like to keep it running as current as possible.  I'm currently running OS X 10.5.8 (Leopard?).  Can anyone