I have created an iPhone app, which is a tab bar application and only in portrait orientation.
From one tab I am presenting a modal view which contain UIImage view.
Can I make landscape orientation only to that view while rotating iPhone to 90 degree?
yes , you can.
There are a few settings, code part which need to make it.
Depends also for which version, hopefully aren't targeting all supported by xcode, because it is horrible. Better choose only one, like the lastest iOS.
Related
If my iPhone App (not universal) starts in landscape mode on my iPad (3rd gen) it does not respond to any touch until I either press the 1x/2x Button or change the orientation. After that it works as normal.
If I start it on my iPhone 5 in landscape mode, it works like a charm.
shouldAutorotateToInterfaceOrientation gives a YES in every View, so I think that's not the problem here.
The first View is a tabbar-view.
I have the same problem too on my iPad mini with iOS6.0.1.
What I do to solve the problem is to set the Supported interface orientations to all off in the info.plist.
Next, add the Supported interface orientations (iPad) in info.plist and only add the Potrait (bottom home button) in it.
It should make no difference to the apps orientation provided that you set it properly in the view controller.
Also, make sure you set a correct initial interface orientation.
It then solves my problem.
The above answers are a bit difficult, especially when using Xamarin. This answer does work:
from another question:
iphone app doesn't respond after starting in landscape orientation on iPad
The comment of Daniel Sandland did solve it for me:
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
in didFinishLaunchingWithOptions,
(the C# variant for Xamarin)
I think this can be the problem of positioning of UI controls present on your screen.
The controls might be having auto positioning parameters (in XIB) may have been set in such way that the controls goes out of screen.
Try to correct resizing parameters in XIB.
I would like to know what is the best way to do what iPhone calculator does as far as switching view from portrait to landscape. To me it looks that the portrait UI is in a view that goes directly (with resizing) into a subview on the right side of the landscape view. And on the left side of the landscape subview there are more calculator buttons added. If this is a reasonable assumption of what is going on, I would like to know how to rotate the portrait xib file to become the right side of a subview in the landscape and furthermore add more stuff to the left side subview of landscape UI? Do I need a second xib file? Or do I rotate one xib file and add stuff in the code to the left subview?
Before going to tell you in detail, i think this answer may help you, if not feel free to give the comment.
I am trying to make a simple iPhone game and I need the game to be in landscape mode. I can get the initial view to be landscape, but if remove the initial view and replace it with a new view (going from Main Menu to Game Screen) the new view is now in portrait mode. Also, if I switchback to the first view (removing the game screen and then creating the new menu view) the view is still in portrait mode. I have the Info.plist file set up correctly to initialize with landscape right and I have the GameViewController.m file set up with the following code:
-(BOOL) shouldAutorotateToInterfaceOrientation:
(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
I have read many postings about people having troubles with setting up the landscape orientation, but they always seem to be about the initial load of the app (only displaying one view). I can't seem to find any solutions for this problem. Can someone help me?
You have stumbled on to
one of the most famous bugs on the platform!
Congratulations for spotting it! Here:
iPhone app in landscape mode, 2008 systems
be sure to read the paragraph that begins: "An important reminder of the ADDITIONAL well-known problem at hand here......." !!
It gives you the solution, which is used in all apps.
Make sure that all the view controllers that are visible on screen support the landscape orientation. I would recommend, in your shouldAutorotateToInterfaceOrientation, to return UIInterfaceOrientationIsIsLandscape(interfaceOrientation); instead of your code. This will ensure that both landscape orientation will work. Can you share a bit more how you are switching from the main menu to the game screen?
I have an app designed for iPhone that makes use of the UIImagePickerController.
The app run in landscape only up until the image picker comes into view in its default portrait.
Problem 1:
On the iPhone when I rotate the device to portrait to view the image library the image picker view seems to do a flip as if rotating from landscape to portrait?
Problem 2:
I get the dreaded warning Using two-stage rotation animation. To use the smoother single-stage animation, this application must remove two-stage method implementations.
Problem 3.
on the iPad when selecting an image the image picker is dismissed and the view is back in landscape but ...... if I then do anything that requires alert view or the keyboard they appear as if the device is in portrait? This does not happen on the iPhone???
I know problem 2 is a long running issue but please can anyone help with problems 1 & 3?
Thanks
number 3 resolved :-)
"The keyboard will show up in the orientation of the statusbar, which doesn't always change with rotations for some reason. So if you want to display that view only in landscape set [UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeLeft; or whichever orientation you want to prefer in your viewWillAppear method."
I am writing a game in the landscape mode. In *.plist I've set the "Initial interface orientation" option to "Landscape (left home button)". In Interface Builder my form seems good, with 2 labels are on the left and bottom.
But when I launch the app in simulator or in iphone that looks like the following
http://www.glowfoto.com/static_image/07-102041L/8907/png/09/2010/img4/glowfoto
Labels are on the top and rotated. Anyone knows what I am doing wrong and how to solve this?
I think your view controller's shouldAutorotateToOrientation method is not returning YES to landscape but to portrait orientations. But without code it's a guess in the wild.