uiinterfaceorientation

Detect iPhone orientation before loading tableview

好久不见. 提交于 2019-12-12 17:44:33
问题 So, I'm in a bit of a bind... According to this post, the orientation of the iPhone/iPad is portrait up to a point after which the "auto-rotate" function inside the controller tells iOS that the orientation has changed. My problem is that it appears as though the tableview cells are loading before I have a chance to detect a change in the orientation. My tableview depends on the orientation of the device, so I can't load it until the orientation is known. Is there something I don't know?

Keeping controls in landscape mode but allowing uitabbar to switch

拟墨画扇 提交于 2019-12-12 14:16:39
问题 I have a UITabBar switches places when the iphone changes orientation and that works fine, but I want the controls within the view of the first tab to stay static regardless of the position of the phone. I feel like I'm missing something obvious? Edit: Basically, the controls are always landscape but the tab bar must switch orientations. It this possible? 回答1: For the view in which you don't want the controls to readjust, disable the autoresizing: [self.view setAutoresizesSubviews:NO]; . This

Modal View Controller force Landscape orientation in iOS 6

谁都会走 提交于 2019-12-12 07:54:35
问题 I have a UITabBarController presented in Portrait mode. On one of the tabs I have a button that shows a UIViewController modally (A simple storyboard segue performs the action). I want this modal view to be shown in Landscape mode, but I can't get it to turn automatically. I have this in the modal views controller - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft); } I've added

MWPhotoBrowser into Tabbar Controller

懵懂的女人 提交于 2019-12-12 05:35:49
问题 I use MWPhotoBrowser to make an image Gallery. If i make a new controller(push) all work fine. Although i want to add MWPhotoBrowser into a custom ViewController which is into a TabBarController . I got this with these lines of code. [self addChildViewController:browser]; [[self view] addSubview:[browser view]]; [browser didMoveToParentViewController:self]; The problem is that when i change the orientation(rotate the device) only a part of screen works. The rest seems to be dead.I suppose

Rotation issue from the first view (splash) to first viewController

痞子三分冷 提交于 2019-12-12 04:48:26
问题 I am working in Xcode 4.5.2, targeting iOS6 for an iPad app, using storyboards and segues. Preamble: my root controller (loaded by the app delegate) is a splash screen with only an image, an upgrade button and an open button. App takes a few seconds to load. I have shouldAutorotate and supportedInterfaceOrientations in all three of my full screen controllers. For rotation notification, I am using the following two methods in my root view controller: - (void)awakeFromNib { [UIDevice

Wired behaviour of UIImagePickerController while capturing photo

人盡茶涼 提交于 2019-12-11 18:59:06
问题 My entire app is in portrait orientation, only camera view should open in landscape orientation. I've taking reference of Apple's sample code of UIImagePickerController , https://developer.apple.com/library/ios/samplecode/PhotoPicker/PhotoPicker.zip In my requirement, I've to force UIImagePickerController to start camera in landscape mode, and need to capture the photos. I'm aware of this, The UIImagePickerController class supports portrait mode only. This class is intended to be used as-is

Change interface orientation when back button is pressed

隐身守侯 提交于 2019-12-11 18:03:57
问题 My app accepts only portrait orientation, except for MPMoviePlayerController , which I want to allow user to change orientation. So, I subclassed UINavigationController and added the following code: -(BOOL)shouldAutorotate { if ([[[self.viewControllers lastObject] presentedViewController] isKindOfClass:[MPMoviePlayerViewController class]]) { return YES; } else { return NO; } } It works great, allowing only my MPMoviePlayerViewController to change orientation. The problem is that when user is

IOS iPad application bottom strange white area

感情迁移 提交于 2019-12-11 16:22:42
问题 I developed iPad tabbar application. I also use custom tabbar on left side. Bu Tab bar has white background along edges in landscape mode and also portrait mode. This area could not delete any of the method. 回答1: It sounds like the sizes you're using in your nib file don't match the layout in your app. You'll need to set the autoresizing mask of your views so that they resize correctly at runtime. You can change the autoresizing masks in the nib by opening the right-hand pane; selecting the

Changing UIViews during UIInterfaceOrientation on iPad

拜拜、爱过 提交于 2019-12-11 11:03:54
问题 I am trying to change views on rotation because my views have to be significantly different from portrait to landscape. Now the code I am using works once then the app freezes when trying to rotate back. Either direction does not make a difference. For example: If I am in Landscape and rotate to portrait everything works great until I rotate back to landscape then it freezes and does absolutely nothing. Here is the code I am using to achieve this In my "viewDidLoad" method [[UIDevice

First UIView in Portrait orientation and second in Landscape

喜你入骨 提交于 2019-12-11 07:04:18
问题 I have an app which has 2 view controllers. The first viewcontroller should be in portrait and it's ok, but when I'm loading the second view controller, I could not make the app orientation to be landscape... The problem is with iOS 6. I have tried everything I found on SO. Using [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO]; on viewWillAppear and viewDidLoad , and also: - (BOOL)shouldAutorotateToInterfaceOrientation: