uiinterfaceorientation

Set status bar orientation in iOS 6.0 [duplicate]

你。 提交于 2019-12-05 12:04:44
Possible Duplicate: setStatusBarOrientation:animated: not working in iOS 6 In iOS 6.0, as AppDelegate by default extends UIRepsonder and not UIApplication there is no global sharedApplication object. Am I missing anything? I am trying to set status bar orientation using following and it doesn't seem to work anymore. I tested it on iOS 6.0 simulator. I know you can set status bar tint color from the plist settings but can anyone please tell me how to set status bar orientation programmatically in iOS 6.0? [[UIApplication sharedApplication] setStatusBarOrientation:UIDeviceOrientationPortrait

Set shouldAutorotate to false with Photolibrary

不问归期 提交于 2019-12-05 05:14:04
If I add a popover with access to my photo gallery from the iPad the system always crash with the following message: Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [PUUIAlbumListViewController shouldAutorotate] is returning YES' But I already set up in my Projekt Information just to support Landscape Mode. So I added the following function override func shouldAutorotate() -> Bool { return false } But I don't know how to use it? If I enable UIInterfaceOrientationPortrait on

UIWindow frame in ios 8 different from ios 7 in Landscape

◇◆丶佛笑我妖孽 提交于 2019-12-05 03:06:15
I've create simple module where I add subview to UIWindow. In simulator ios 7(Xcode 5.1.1) I have printed self.windows and I get: <UIWindow: 0x8db1670; frame = (0 0; 768 1024); autoresize = W+H; gestureRecognizers = <NSArray: 0x8db1a70>; layer = <UIWindowLayer: 0x8db17d0>> but on ios8 (Xcode 6 beta 6) I get: <UIWindow: 0x794320d0; frame = (0 0; 1024 768); gestureRecognizers = <NSArray: 0x79437a80>; layer = <UIWindowLayer: 0x7943c400>> The question is: why there is a difference in frame property? fdiaz Probably in your AppDelegate you initializing your UIWindow like this self.window = [

How to rotate a view in controller that is not allowed to rotate its interface?

天涯浪子 提交于 2019-12-05 02:21:47
问题 Help me to solve the task - I have a viewController that is not allowed to rotate its interface: - (BOOL)shouldAutorotate { return NO; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } But I need to rotate alertView which appears in this controller! So if user rotates the device the alertView should follow the rotation and the main interface stands still. I've tried to subscribe to notification: [[NSNotificationCenter defaultCenter] addObserver:self

Determining the Orientation of the screen rather than the orientation of the device

醉酒当歌 提交于 2019-12-04 16:41:49
问题 The [[UIDevice currentDevice] orientation] method returns a number of orientations beyond the portrait and landscape orientation. I am well aware of checking to see if the orientation returned is "valid", unfortunately if the orientation returned is NOT "valid" when my app requires a specific orientation to determine which methods to run, I have no way of knowing which method is appropriate. I have attempted a number of solutions to this, but for now the only thing I have been able to work

iPad app to start in landscape mode

不羁岁月 提交于 2019-12-04 15:33:41
I searched for other existing posts, but none of them satisfied my requirements. Here is the problem i face, My app supports both the Modes , landscape and portrait. But my first screen only supports Landscape , so the app must start in Landscape. I have set supported Orientation to all the 4 options I have set the Initial interface orientation to Landscape (left home button) In the view controller of the first screen i am defining the below -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation !=

A view controller is in landscape mode, but I'm getting the frame from portrait mode?

一世执手 提交于 2019-12-04 13:31:14
问题 I have a settings view controller with a table view. The table view is supposed to set its frame to be the frame of the view controller. My app only supports landscape mode, so that's the orientation I'm always in. However, when the settings view controller loads, the table view has the portrait mode frame of the view controller, even though it's in landscape (360 by 480 when it should be 480 by 360). Additionally, when I checked to see if the device thought it was in portrait mode, it

how to rotate parent view controller when child view controller orientation changes in iOS

北慕城南 提交于 2019-12-04 12:38:54
I am displaying Child view controller on my parent view controller using childView1 *viewController = [[childView1 alloc]initWithNibName:examTFVC_NIB bundle:nil row:gesture.view.tag productID:test_productID size:testsize Duration:duration]; self.modalPresentationStyle = UIModalPresentationCurrentContext; self.view.alpha = 0.4f; viewController.view.backgroundColor = [UIColor clearColor]; viewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentViewController:viewController animated:YES completion:NULL]; I am displaying transparent view controller over my parent

Disabling auto rotation for a UIView

自闭症网瘾萝莉.ら 提交于 2019-12-04 08:56:34
问题 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 (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation ==

why is my view still presented in landscape?

被刻印的时光 ゝ 提交于 2019-12-04 06:30:34
问题 my view is controlled by a navigation controller, so I set the supported orientations in to the navigation controller to explicitly portrait & portraitUpSideDown and this works, however if the previous view was in landscape when the view was called upon, it will present itself in landscape and stay in landscape until the device is rotated.. How do I prevent this? Here is my code: class EditProfileViewController: UIViewController, UINavigationControllerDelegate override func viewDidLoad() {