uiinterfaceorientation

UIScrollView with pages enabled and device rotation/orientation changes (MADNESS)

I'm having a hard time getting this right. I've got a UIScrollView, with paging enabled. It is managed by a view controller (MainViewController) and each page is managed by a PageViewController, its view added as a subview of the scrollView at the proper offset. Scrolling is left-right, for standard orientation iPhone app. Works well. B...

How can I programmatically know which interface orientaton I am in when the application loads?

Using some of the methods, I am able to check the orientations to which I am rotating my device. But how can I know the orientation in which I am in when the app is loaded? I want to write the code to rearrange the views in the viewDidLoad method by checking the way my orientation is in? ...

Forcing UIInterfaceOrientation changes on iPhone

I'm strugging with getting an iPhone application which requires just about every push or pop in the Nav Controller Stack to change orientation. Basically the first view is portrait, the second landscape the third portrait again (Yes I know this is less than ideal, but that's the design and I've got to implement it). I've been through v...

shouldAutorotateToInterfaceOrientation and Animations

Hey guys, When I return NO from my shouldAutorotateToInterfaceOrientation: method in my view, my beginAnimations doesn't animate anymore! The code looks something like this: - (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation { return (UIInterfaceOrientationIsPortrait(interfaceOrientation)); }...

How to hide UIStatusBar and show UINavigationBar at the top when UIView changes to LandscapeOrientation

I am using two views (portraitView and landscapeView) loaded from xib in a viewcontroller for different InterfaceOrientation each for Portrait and Landscape mode. The view in portrait mode has statusbar and navigationbar and other one has just the navigationbar. The problem is that even i made statusbar hidden programatically the view in...

Any way to trigger interface orientation check?

My app is going from a flipside view (only one orientation) to its main view (can have any sort of orientation. When I go from flipside back to main view, the main view's orientation is not checked and changed immediately. I need a way to trigger the built in orientation check that happens in willRotateToInterfaceOrientation so that ...

Why can't I retrieve UIDeviceOrientation correctly while playing a movie in MPMoviePlayerController?

Everything works fine while I'm not playing anything (I'm calling beginnotifications, etc, and using the orientation to rotate my view). But after I start playing with MPMoviePlayerController everytime when I try UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; The orientation gets a UIDeviceOrientationUnknown...

UITabBarController with viewControllers utilizing different orientations?

Hi I can see that this is something that has been troubling a lot of people:/ I have a UITabBarController that has 4 viewControllers, all of type UINavigationController. One of the navigationControllers gets a viewController pushed onto its stack, this viewController should be presented in landscape mode/orientation. The viewControlle...

Why does this UIImage disappear from UITableViewCell when rotating to landscape?

I'm trying to set up a UITableViewCell that can have an image in the upper right corner. I have it working for portrait mode, but when I rotate to landscape, the image disappears. Here's the code: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifi...

iPad orientation on launch problem in portrait (bottom home button)

Hi.... I've an iPad app that supports all orientation... my problem was on the start up of the application. In case of landScapeRight and landScapeLeft and portrait(top home button) the views shows correctly but when the app start in portrait (bottom home button) the views show in landscape mode... I've implemented the - (void) willRo...

Transitioning to portrait rotation within a UINavigationController

I have a case where a portrait only mode view needs to be pushed into a navigation controller which has a landscape mode view as its current view. Although I have reimplemented -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfac...

iPad orientation change issue

My iPhone application is displaying some odd behavior when run on the iPad with respect to supporting orientation changes. The app starts up with a view controller (call it view A for the sake of argument) and navigation controller, and shouldAutorotateToInterfaceOrientation is returning YES for portrait only. Onto the navigation contr...

Support orientation at runtime for UITabBarController

I have a UITabBarController that supports four different views, all UINavigationController. To enable the orientation, all views in tabs active at that moment must support it. The problem is that I only enabled the orientation to some views in the grafts UINavigationController. For example: UITabBarController: UINavigationController1: ...

What is the better way to switch between portrait and landscape interfaces?

I have two different views (portrait and landscape) for each screen (home, user info, etc). The difference between portrait and landscape views is enough to have each one into a different view and view controller because it's not only a relocation and resizing of controls. To perform the switching between the two views I have a contain...

UISplitView - load different detailView's for each row in masterView

Hello, I'm using UISplitViewController for app on iPad. The first task was to show master and detail view in portrait mode. I have done this like that: // It is possible to keep the Master View in portrait mode // also. Just pass YES to this method to enable this mode. - (id) initWithMasterInPortraitMode:(BOOL) masterInPortrait { s...

[iPhone] Disabling auto rotation for a UIView

Hi ! My application is composed of a toolbar and an AVCaptureVideoPreviewLayer in a background UIView. I'd like to see that toolbar rotate regarding the device orientation, so in my main ViewController, I implemented the function : - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return ...

UIOrientation returns 0 or 5

I am running a simple function that get's called in multiple areas to help deal with layout on an iPad app during orientation changes. It looks like this: - (void) getWidthAndHeightForOrientation:(UIInterfaceOrientation)orientation { NSLog(@"New Orientation: %d",orientation); end And I call it in various places like this: [self g...

iPhone & iPod Touch Orientation Problem

I have a home screen that loads content from the internet. During the application if the phone or iPod loses internet connection a UIAlertView pops up allowing users to restart the application. When they click restart the home page is pushed onto the screen. The home page only supports one orientation: portrait. It looks horrible in ...

Only direct subviews of the MainWindow view gets orientation set by iOS?

Hey guys, Whenever my app is rotated, only the viewController of which I've added his view as a subview to the mainwindow gets his interfaceOrientation property updated, the rest remains ignorant of the fact the device has been rotated. Is it my responsibilty to notify other objects of the change, and if so, what's a nice way to do it?...

How do I detect an iPad's interfaceRotation at the start?

Hi, I'm having problems getting my iPad app to detect its interfaceOrientation in the first UIViewController I initialize (in code). In fact, if I trace for application.statusBarOrientation, that too returns 1 (UIInterfaceOrientationPortrait) even if I launched in landscape. If I trace self.interfaceOrientation in my first UIViewContro...