iPhone App Needs to Lock Portrait on Menu but Landscape on Video Player

Discussion in 'iOS Programming' started by SixBladeKnife, Oct 7, 2011.

  1. SixBladeKnife macrumors newbie

    Oct 7, 2011
    0 down vote favorite
    share [fb] share [tw]

    I'm having a very simple app developed for iPhone/iPodTouch/iPad. It's done with the exception of an orientation issue. I need to lock the app's main menu in portrait orientation. When the app plays a video, it needs to lock in landscape. After the video ends, it returns to the menu, which should be forced back to portrait and locked in that orientation.

    The app consists of a main menu with 4 buttons. When a button is clicked, a video is played.

    Our developer said this functionality doesn't exist, but I can't imagine that is doesn't. We had the same app developed on Android with no problem.

    So just to clarify the details. Main menu only displays portrait. Videos only display landscape. And info on how to do this is greatly appreciated.

    Thank you very much ahead of time for your replies.
  2. ArtOfWarfare macrumors G3


    Nov 26, 2007
    I don't know much about video, but I would say that when the button to start the video is pressed, have the iPhone lock to landscape, and I'm sure there's some delegate method that'll let it know when the video is done playing where the iPhone can be told to resume its lock to portrait.
  3. xStep, Oct 7, 2011
    Last edited: Oct 7, 2011

    xStep macrumors 68000

    Jan 28, 2003
    Less lost in L.A.
    I can't say I know, but here's some thoughts.

    If the developer is using the basic video playback framework, then perhaps a locking capability does not exist in it. The Apple code would rotate the image as the user rotates the device. Frankly, that sounds like what you are going to force your user to do anyway.

    Perhaps a lower level playback framework has the ability to lock video playback. I'm certainly not going to research it for your developer. They can did into those options.

    Look into the method "shouldAutorotateToInterfaceOrientation:".

Share This Page