problem about uiinterfaceorientation-Collection of common programming errors
Dave
ipad uiviewcontroller ipad-splitview uiinterfaceorientation
I am presenting MFMailComposeViewController as modal from a view controller (lets call it xyz) added to nav stack. When user clicks on cancel button, the MFMailComposeViewController is dismissed. This works fine when xyz is added to nav stack in portrait/landscape mode and the device orientation doesn’t change until after cancel is clicked. present modal – alloc init MFMailComposeViewController on a button tap[self.navigationController presentModalViewController:mailController animated:NO];dismi
NSUserDefault
iphone uinavigationcontroller ios6 uiinterfaceorientation
I created an app in ios 6 with navigation view.Also I have set all orientation options in the application summary and even used the-(BOOL) shouldAutoRotateand -(NSUInteger) supportedInterfaceOrientaionmethods in my view controller.when I run my app orientation works fine except upside-down.What should I do to also support upside-down.I also facing the same problem when I add UITabBar controller.Please share your ideas.Thank you
Iván Peralta
uitextfield uiinterfaceorientation uikeyboard
We’ve a UIViewController for login on our application, the first load works perfectly, but after a logout, when we back to the login page, we detect some unexpected problem for 6.1 version.I configure the events keyboardDidShow and keyboardWillHide based on notifications, because the Keyboard appear out of the screen.If I print the CGRect of the keyboard based on the UIKeyboardFrameEndUserInfoKey, the behavior is very estrange:First field: {{inf, inf}, {0, 0}} Second field: {{160, 487}, {0, 0}}
Aleksander Azizi
iphone objective-c ios6 uiinterfaceorientation
In iOS 5 we could change the device orientation programmatically like so:[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];But in iOS 6 setOrientation is depreciated, how may i change the device orientation programmatically in IOS 6?
Johnny Tee
iphone orientation screen-orientation uiinterfaceorientation
My app is going from a flipside view (only one orientation) to its main view (can have any sort of orientation. When I go from flipside back to main view, the main view’s orientation is not checked and changed immediately. I need a way to trigger the built in orientation check that happens in willRotateToInterfaceOrientation so that the orientation is correct when the user goes from flipside view to main view. Any help is appreciated.I saw another question about this but didn’t see a definiti
Pask
iphone uiviewcontroller uinavigationcontroller uitabbarcontroller uiinterfaceorientation
I have a UITabBarController that supports four different views, all UINavigationController. To enable the orientation, all views in tabs active at that moment must support it. The problem is that I only enabled the orientation to some views in the grafts UINavigationController. For example:UITabBarController: UINavigationController1: View1 -> View2 -> View3 -> View4 UINavigationController2: View1 -> View2 -> View3 -> View4 UINavigationController3: View1 -> View2 -> View3 -> View4 UINavigationCon
Halle
objective-c ipad uisplitviewcontroller uiinterfaceorientation tabbarcontroller
I am writing my first tabbar iPad application to which split view controller is added. Everything is working fine but the problem is I am trying to display the root view controller and detail view controller whenever the view gets loaded in portrait mode. To be very clear, I need two controllers to appear the same way as they would appear in landscape mode. Please let me know guys, if there is a way to do it or any other thoughts you have so that it will be helpful for me.I look at MGSplitViewCo
Vinayak Kini
ios objective-c ipad ios6 uiinterfaceorientation
I check the orientation of the device in viewDidAppear and viewWillAppear and force the orientation by calling willAnimateRotationToInterfaceOrientation method. – (void) viewWillAppear:(BOOL)animated{[super viewWillAppear:YES];_levelComplete = YES;[self willAnimateRotationToInterfaceOrientation:[[UIDevice currentDevice] orientation] duration:0.01];}- (void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{if (toInterfaceO
Jackson
cocoa-touch ios orientation uiinterfaceorientation viewdidappear
I just tracked down a crash I was having in my iOS app and it is related to willAnimateRotationToInterfaceOrientation being called before viewWillAppear.I have an app with two views. Basically, when view1 disappears, I release some arrays, assuming they will be re-initialized when it re-appears in viewWillAppear.However, if I change orientation in view2 then switch back to view1, this causes willAnimateRotationToInterfaceOrientation to happen before view1 has calledviewWillAppear and re-initiali
wael
iphone uiimage landscape uiinterfaceorientation page-curl
Please help me find an answer since i searched everywhere in here and many other websites. Am using this code to make the pageCurl effect. // Start Animation BlockCGContextRef context = UIGraphicsGetCurrentContext(); [UIView beginAnimations:nil context:context]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUpforView:[self view] cache:YES]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:1.0];// Start Animation BlockCGContextRef context = UI
CAMOBAP
ios uinavigationcontroller uiinterfaceorientation
I am using UIImagePickerviewController to open the photo library through the below attached code… after called bit lines of code. The application was crashed… Its working fine in ios5UIImagePickerController* content = [[UIImagePickerController alloc] init]; content.delegate = self; content.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; [self presentModalViewController:content animated:YES]; [content release];Is anything wrong with this code?
sirab333
iphone rotation ios6 uiinterfaceorientation
THIS IS NOT A DUPLICATE QUESTION. A final working solution has NOT been provided yet so please do not close this question until we’ve accepted an answer or found and provided our own 100% working solution. Thanks!==================================================================Using Xcode 4.5.1, we have a tab-bar app with 5 tabs in it. Each tab contains a UINavigationController, so the entire App thus needs to be viewed in Portrait mode. There is one exception: an “image-gallery” type view con
user2029585
ios orientation uiinterfaceorientation autorotate landscape-portrait
My app is portrait only except one view which contains an embedded YouTube video. That view is supposed to open in landscape and up until recently, worked just fine. The only change I have made to the app is to make it a universal app. I have made no changes to the code for this view though. Any ideas?EDIT: It seems that the view initially loads ok in landscape if you are still holding the device in portrait. It doesn’t crash until you actually rotate the device or, if you keep holding the d
El Duderino
orientation ios6 uiinterfaceorientation
just had to update an iOS 5 App to iOS 6 and of course stumbled over the interface orientation issues. I now already know that things changed and I even know what changed, still I can’t seem to manage it on my own.My App consists of several viewcontrollers, which get pushed onto a navigationcontroller. All viewcontrollers are supposed to be in landscape orientation, except for one, which should be in portrait orientation. In iOS 5 everything worked fine, but now the one controller in portrait mo
pratik bhiyani
iphone objective-c cocoa-touch landscape uiinterfaceorientation
this issue is supposed to be a simple one… i have googled a lot about it and i have tried all the setups on my project. the thing is i am working on a project that is not mine. the app launched from the app delegate and then i am adding aUIViewController (without XIB file) everything done by code. the ViewController is actually on landscape, but the thing is the the app is running on portrait (when i am pulling the notification view it turns dow like in the portrait mode).this is implemented
David
iphone ios objective-c game-center uiinterfaceorientation
I have checked other solutions to this problem and none have worked for me. If I try to authenticate a GKLocalPlayer on my physical iPhone (not the simulator; this works in the simulator), I get the following error:Terminating app due to uncaught exception ‘UIApplicationInvalidInterfaceOrientation’, reason: ‘Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES’*** First throw call stack: (0x373463e7 0x33d7e963 0x37346307 0x3815b857 0x382ff
Hosemeyer
objective-c uiimagepickercontroller uiinterfaceorientation
Ever since updating my device to 6.1, I’m getting a crash when trying to show the UIImagePickerController. I only use Portrait orientation.The Crash:Reason: * Terminating app due to uncaught exception ‘UIApplicationInvalidInterfaceOrientation’, reason: ‘preferredInterfaceOrientationForPresentation must return a supported interface orientation!’Here is where I call the UIImagePickerController:if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {//The devi
kevin.ng
objective-c uiviewcontroller uiinterfaceorientation uiapplication
I managed to push an ABNewPersonViewController to my navigation controller. However I encountered this error when I’m selecting “Add photo” -> “Choose Photo”:* Terminating app due to uncaught exception ‘UIApplicationInvalidInterfaceOrientation’, reason: ‘Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES’This error is caused to due the fact that I want my iPad application to have landscape-only orientation.Any idea how to solve this probl
rmaddy
ios objective-c ipad uiinterfaceorientation
In the RootViewController of my application the orientation code is as below:- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {if(self.activeNavigationController){//NSLog(@”querying active navigation stack (topViewController = %@) for rotation support …”, self.activeNavigationController.topViewController);return [self.activeNavigationController.topViewController shouldAutorotateToInterfaceOrientation:interfaceOrientation];}else{return YES;} }Now I hav
Wolvorin
ios6 uiimagepickercontroller landscape uiinterfaceorientation
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 retur
Minna zacharias
iphone game-center uiinterfaceorientation ios6
When Game center is loaded its default orientation is portrait. In order to lock it in landscape mode, added a category.@implementation GKMatchmakerViewController (LandscapeOnly)- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return ( interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight); }-(NSUInteger)supportedInterfaceOrientations {return UIInterfaceOrientationMaskLandscape; }-
Maulik
iphone ios xcode uiinterfaceorientation
My application is Landscape based. The app crashes immediately when the app runs on my device. I have selected these two fieldsUIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRightI am getting this error:Terminating app due to uncaught exceptionUIApplicationInvalidInterfaceOrientation, reason: Supportedorientations has no common orientation with the application, andshouldAutorotate is returning YES
Purva
iphone uiwebview xcode4.2 uiinterfaceorientation
I am using the web view to display the HTML contents and using some methods for orientation but as i change the orientation form landscape to portrait for the first time the text goes out from the view.And when i scroll from portrait to another page it shows me the perfectly.May be this happens because of the width from landscape to portrait.The code and method i use is below:Setting the page size- (void)setPageSize:(NSString *)orientation { NSLog(@”. Set size for orientation: %@”, orientation);
Geri
ios uiviewcontroller uinavigationcontroller uiinterfaceorientation autorotate
What else should I do?-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) toInterfaceOrientation {return (toInterfaceOrientation == UIInterfaceOrientationPortrait); }- (NSUInteger)supportedInterfaceOrientations {return UIInterfaceOrientationMaskPortrait; }-(BOOL)shouldAutoRotate {return NO; }My viewController still rotates.It is embedded in a navigation stack. If I subclass UINavigationController, and implement the same portrait-only templates there, and I embed my viewControl
lambruscoAcido
iphone uinavigationcontroller uitabbarcontroller rotation uiinterfaceorientation
I wanna show a full-screen Landscape view whenever the user rotates the iOS device from portrait to landscape, where the portrait view is a view within a TabBar and NavigationController. However, willRotateToInterfaceOrientation:duration: is never called. I tested also to add the ViewController as Observer of UIDeviceOrientationDidChangeNotification events, but this notification is called also with undefined orientation.What would be the best and easiest way for the given task?
Web site is in building