uiinterfaceorientation

Change UIInterfaceOrientation for only one UIViewController in app

余生长醉 提交于 2019-12-02 04:54:07
I have an iPhone app with structure like "Navigation controller with table -> next view controller with table -> QLPreviewController". By tap in cell of table in first view controller(with navigation controller) appears new view controller with another table, by tap in cell of it shows QLPreviewController. For example: In first table there are Groups, in second table - Documents of selected Group, and QLPreviewController for previewing selected Document. Every ViewController in my app must to appear only in Portrait(not upside) orientation, but QLViewController must also support Landscape(left

How to get default LandscapeLeft Orientation in iOS5?

情到浓时终转凉″ 提交于 2019-12-02 03:47:23
Sorry if this question is duplicate, but I can't find the same solution. In iOS6, if I want to set default orientation for one UIViewController, I just use: - (BOOL)shouldAutorotate { return YES; } - (NSUInteger)supportedInterfaceOrientations{ return UIInterfaceOrientationMaskLandscapeLeft; } But how to do same in iOS5, I test both: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft);//not default } and - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation

iOS 6 rotation not working

旧巷老猫 提交于 2019-12-02 03:45:28
I have overridden my UINavigationController to implement these methods: -(BOOL)shouldAutorotate { return [[self.viewControllers lastObject] shouldAutorotate]; } -(NSUInteger)supportedInterfaceOrientations { return [[self.viewControllers lastObject] supportedInterfaceOrientations]; } - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { return [[self.viewControllers lastObject] preferredInterfaceOrientationForPresentation]; } Now from my first view, I modally present this MSNavigationPaneViewController here which is like a Facebook side sliding tab bar controller. I need 1 of

iOS 6 - Navigation Controller Landscape Rotations For Some Views While Others Portrait Only

别来无恙 提交于 2019-12-02 00:50:33
问题 I am building an app that will be Portrait only for the main views (Both normal and upside down). I have set this setting in the Project Settings/Plist and all works fine. However, I have a few modal views that do things like display images/videos, and I want them to be able to rotate to ALL orientations. I tried adding a category for UINavigationController but no luck. I have also added to the viewController that calls the modal the below code: -(BOOL

How to manage application when orientation changes?

淺唱寂寞╮ 提交于 2019-12-02 00:39:12
问题 I have an application in which I am changing screen orientation. But when I change orientation for the first screen and go to the next screen, the change does not persist. Attached are images for clearer understanding. The main problem is that when device is rotated then first screen rotates but second does not launch in the new orientation. It will rotate only when we change orientation after the screen is launched. How do I fix that? 回答1: The problem is that when you rotate the device then

Objective c - UIActivityViewController orientation mode

末鹿安然 提交于 2019-12-02 00:07:21
问题 My iPhone app is design to support portrait orientation only, except one view controller that present photos, and support landscape mode as well. So overall my project support all the orientations, but every view controller (except the photo view controller) implement the method: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortrait); } The problem: In one of my (only portrait) view

how to use UIImagePickerController in an app which support Landscape orientation only in iOS-6?

隐身守侯 提交于 2019-12-02 00:05:24
问题 I am developing an app which supports Landscape orientation only. It uses an UIImagePickerController to pick images and/or videos from the library. App is functioning fine in iOS-5 or before but it gets crashed when I try to present image picker controller.It gives the following message after crashing: * Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is

Need help setting up an interface where rotation is fixed for most elements, but alert and sharing boxes auto-rotate with the device

折月煮酒 提交于 2019-12-01 23:53:32
I'm working with Xcode 7 and Swift 2. I am working on an interface with a camera preview layer and controls that display in a manner similar to the native iOS camera app. The controls all stay in place as you turn the device, but the icons "pivot" in place to orient properly for the device orientation. (I hope I explained that in a way that makes sense. If not, open the native camera app on your iPhone and turn the device around a few times to see what I'm talking about.) I have the basic interface working already by fixing the overall interface orientation using: override func

Objective c - UIActivityViewController orientation mode

只愿长相守 提交于 2019-12-01 21:12:32
My iPhone app is design to support portrait orientation only, except one view controller that present photos, and support landscape mode as well. So overall my project support all the orientations, but every view controller (except the photo view controller) implement the method: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortrait); } The problem: In one of my (only portrait) view controller, I'm using UIActivityViewController to let the user choose sharing content through email or SMS.

iOS 6 - Navigation Controller Landscape Rotations For Some Views While Others Portrait Only

天涯浪子 提交于 2019-12-01 21:03:46
I am building an app that will be Portrait only for the main views (Both normal and upside down). I have set this setting in the Project Settings/Plist and all works fine. However, I have a few modal views that do things like display images/videos, and I want them to be able to rotate to ALL orientations. I tried adding a category for UINavigationController but no luck. I have also added to the viewController that calls the modal the below code: -(BOOL)shouldAutomaticallyForwardAppearanceMethods{ return NO; } -(BOOL)shouldAutomaticallyForwardRotationMethods{ return NO; } I have added the below