autorotate

Problems with multiple xibs for rotation under iOS6

陌路散爱 提交于 2020-01-04 06:22:46
问题 I need to use different xib files for portrait and landscape. I am not using Auto Layout but I am using iOS6. (See my previous question if you care why.) I'm following Adam's answer to this question modified with amergin's initWithNib name trick, modified with my own iPhone/iPad needs. Here's my code: -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { [[NSBundle mainBundle] loadNibNamed:[self xibNameForDeviceAndRotation

willAnimateRotationToInterfaceOrientation not called on ios6/7

半腔热情 提交于 2020-01-03 03:34:21
问题 I have an old app, that still lives on iTunes, written in iOS 5. I would like to update it to run on ios 6 and 7. Everything has been fine so far, and I have updated my code to use ARC. However when trying to maintain the same autorotation philosophy I keep hitting a brick wall. I have already checked relative topics within SO like: Forcing landscape and autorotate in iOS 7, Autorotate in iOS 6 has strange behaviour and following a similar topic I have found this: iOS 6 Autorotation Problems

iphone autorotation animation

六眼飞鱼酱① 提交于 2020-01-02 05:41:10
问题 Is it possible to turn off the animation for the autorotation? I want it to rotate, but I just dont want the animation to occur (like an instant switch). 回答1: Just add the following code to overwrite the standard rotation animation: - (void)viewDidLoad { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:UIDeviceOrientationDidChangeNotification object:nil]; } - (void)didRotate:(NSNotification *)notification { orientation = [[UIDevice currentDevice]

Prevent AlertView from auto rotating

南楼画角 提交于 2019-12-31 02:14:09
问题 The launch page of my app is set to portrait only with this little bit of code: - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait ; } When the app launches a UIAlertView appears for username and password entry. The method to display it is called from viewWillAppear . This worked fine for iOS6 but since iOS7 , if I switch the device to landscape, the main view remains in portrait but the the alert view and keyboard rotate to landscape. A further bizarre

How to handle autorotation in AVCaptureVideoPreviewLayer?

南笙酒味 提交于 2019-12-30 00:38:18
问题 My application supports all orientations except PortraitUpsideDown. In my view hierarchy I have an AVCaptureVideoPreviewLayer as a sublayer in the top view which is UIImageView. Then below it in view hierarchy are several overlay views showing controls. Overlay views are working properly with orientation changes, but I don't how to be with this AVCaptureVideoPreviewLayer. I want it to behave like in Camera app, so that previewLayer stays still and controls are smoothly reorganized. Right now

UiSplitViewController doesn't autorotate

廉价感情. 提交于 2019-12-29 04:54:11
问题 I have recently run into a problem. My iPad app is somehow preventing the iPad from auto-rotating. My app loads a UISplitView with both of the view controllers returning YES for shouldAutorotateToInterfaceOrientation:. I have set up my info.plist to include the "Supported interface orientations" key with all four orientations. When I run the app, however, rotating the device does not rotate the splitView (even though I am receiving UIDeviceOrientationDidChangeNotification). In addition, when

Monotouch.Dialog IOS 6 Split view Rotation issue

独自空忆成欢 提交于 2019-12-24 03:07:05
问题 BUMP .. still havent figured this out, the thing rotates, but out of view. so weird. can i provide better information to get help? STILL HAVING THIS ISSUE! its really bad i cant fix this :( help PLEASE BUMP .. please im dieing here! someone anyone! :) So, I'm using Monotouch.Dialog and since IOS 6, the rotation of my splitview controller is acting weird. It is actually rotating, but my detail view takes up the whole screen and the master view seems as if its being rotated off the screen frame

How to support only portrait mode on an iPhone app

我的梦境 提交于 2019-12-23 13:06:41
问题 I have a strange problem in an iPhone app I'm developing. I want my app to support ONLY portrait mode, but for some reason I can't do it (device & simulator). To support only portrait mode I did as follow: In the TARGET summary section on Xcode, I chose only portrait. All my ViewControllers implements shouldAutorotateToInterfaceOrientation But as I said it won't work, and the strange result is that the app support ALL the orientations (portrait, upside down, landscape left, landscape right).

iPhone UIActionSheet auto-rotating not working

流过昼夜 提交于 2019-12-23 10:40:49
问题 I read a lot about that. People say it will not autorotate whene its parent is not set to auto rotate. I tried everything but no luck. I created view-based app (v4.2) with a button that executes this: UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Title" delegate:self cancelButtonTitle:@"Cancel Button" destructiveButtonTitle:@"Destructive Button" otherButtonTitles:@"Other Button 1", nil]; actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque; [actionSheet

Autorotation in ios5--most common reasons why it fails?

末鹿安然 提交于 2019-12-23 03:35:31
问题 I'm confused about the implementation of autorotation in ios. I have a UIViewController, and I tell it to autorotate inside shouldAutoRotateToInterfaceOrientation. However, it doesn't work. So I read something about how I need to look at the navigation stack AND/OR whether a UITabBarController was used, because this has been known to cause all kinds of confusion (raises hand). In fact, I have a UITabBar and a UINavigationController. The UIView that I want to rotate is being pushed onto the