uiinterfaceorientation

UIWindow frame in ios 8 different from ios 7 in Landscape

此生再无相见时 提交于 2020-01-02 02:18:28
问题 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

Orientation without animation giving weird result when UIAlertView is present

房东的猫 提交于 2020-01-01 08:48:11
问题 I am facing a weird problem here. For some reason I am disabling the animation during orientation change in my view controller using [UIView setAnimationsEnabled:NO]; But when the alert view is present and if I change the orientation then it is giving weird result. The attached screen shot is when I change the orientation to landscape. Please note: I am using standard UIAlertView and it is default overlay which is shown when the alert view is present and there is no customisation involved

Quick 180 rotation of iOS Device results in the camera viewing upside-down

ε祈祈猫儿з 提交于 2020-01-01 04:41:27
问题 I've implemented the code below to change the orientation of an AVCaptureVideoSession based upon the UIInterfaceOrientation : - (AVCaptureVideoOrientation)interfaceOrientationToVideoOrientation:(UIInterfaceOrientation)orientation { switch (orientation) { case UIInterfaceOrientationPortrait: return AVCaptureVideoOrientationPortrait; case UIInterfaceOrientationPortraitUpsideDown: return AVCaptureVideoOrientationPortraitUpsideDown; case UIInterfaceOrientationLandscapeLeft: return

iOS 8 GM does not update constraints on collection views

冷暖自知 提交于 2020-01-01 04:13:09
问题 In Xcode 6 Beta 7 and all versions before it, I had a collection view that would update its constraints on its cells when an iPad would rotate between landscape and portrait. Now, it doesn't update at all, and in fact it looks exactly like how I leave it in the XIB, which implies to me that it's not updating at all. It appears that the reusable views I'm using are updating correctly, but the cells certainly are not. Has anyone else run into this issue yet? Anyone have any ideas for how to get

How to get default LandscapeLeft Orientation in iOS5?

可紊 提交于 2019-12-31 04:41:26
问题 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 ==

iPhone - Screen Rotation?

南楼画角 提交于 2019-12-30 07:25:16
问题 What's the difference between UIDeviceOrientation & UIInterfaceOrientation ? Which one should I use to detect rotation on a UIView? 回答1: UIDeviceOrientation gives you information about the physical device itself while UIInterfaceOrientation tells you about the orientation of the views it is displaying. These do not need to match; when a user uses the orientation lock or if the the device orientation is face up. You probably want to be checking UIInterfaceOrientation and the rotation methods

View rotation notifications: why didRotateFromInterfaceOrientation: doesn't get called?

一曲冷凌霜 提交于 2019-12-30 04:00:07
问题 I'm trying to detect any device orientation change so that I can update the views. I want to update the views whether the orientation is portrait or landscape, so I implemented this method: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations. return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation ==

Set different supportedInterfaceOrientations for different UIViewControllers

≯℡__Kan透↙ 提交于 2019-12-29 08:12:48
问题 So, as by the question, I use the following code to set userinterfaceOrientation for the viewcontroller. - (BOOL) shouldAutorotate { return YES; } -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } I tried setting UIInterfaceOrientationMaskAll for another viewController. Prior, I checked all the items for Supported interface orientations in the info-plist. Both the viewControllers returned true (as set in the info-plist) for all the orientations and

Set different supportedInterfaceOrientations for different UIViewControllers

你。 提交于 2019-12-29 08:12:08
问题 So, as by the question, I use the following code to set userinterfaceOrientation for the viewcontroller. - (BOOL) shouldAutorotate { return YES; } -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } I tried setting UIInterfaceOrientationMaskAll for another viewController. Prior, I checked all the items for Supported interface orientations in the info-plist. Both the viewControllers returned true (as set in the info-plist) for all the orientations and

Forcing UIInterfaceOrientation changes on iPhone

我怕爱的太早我们不能终老 提交于 2019-12-28 06:45:10
问题 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 various advice on here.... How do I detect a rotation on the iPhone without the device autorotating? Force portrait orientation on pushing new view to