UILabels don't look good in the landcsape mode - iphone

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.

Related

iPhone App on iPad not responding to touch at first start

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.

Changing parameters on iOS device orientation

I have a Tabbar project in which one one the tabs should be on landscape mode. I've seen than the Tabbar controller only allows it only if all its views allow it. Son now I'm somehow forced to adapt all the views for both portrait and landscape mode, which I've never did before.
Am I right assuming that all should be done under:
-(void)willAnimateRotationToInterfaceOrientation...
so what happens with subview which are lazyly initialized? such as a footerView on a tableView?
Another thing is, I have a method to scroll the tableView so nothing is kept under the keyboard when it's called. The method uses a constant float + a variable. In landscape mode, the constant should be another.
Any feedback would be appreciated. Thanks in advance!
Read up on autoresizingmask - setting this attribute on your views will automate a lot of the orientation resizing.
And yes, you'll need a landscape and a portrait value for your constant.

View layout conflicts when switching to landscape mode

I have a problem with my iOS application ...
This is what it looks like in portrait mode, pretty normal, nothing bad I could say.
This is what it looks like in landscape mode.
The view beneath the segmented control overgrows, covering the segmented control.
I tried to change the settings in the size inspector and the best thing I could do is this:
Still not what I wanted (now white stripe beneath the segmented control covers the view, and I still don't know where it came from).
I would really appreciate if someone could help me make the landscape view similar to the portrait one, regarding the segmented control - > view thing.
you will have to use autosizing ...
tutorial for autosizing can be found here :
http://www.edumobile.org/iphone/iphone-beginner-tutorials/how-to-use-autorotation-and-autosizing-in-iphone/

Switching views from portrait to landscape in iPhone just like the calculator in iPhone

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.

Programming with Interface Builder in Landscape mode

I want to design an application by using Interface Builder, in Landscape mode. I don't know how to put the controls suitable to the Landscape mode. All I know I m rotating my UIView by using self.transform. I am new in it. So can anyone help me.
Not sure if this is answering your question but you can rotate the views in IB to show in landscape mode by click on the arrow in the top right corner
See the image
IB landscape
I realize this is a bit old, but in Xcode4+ I can't see any rotation arrows. So instead, open your .xib > go to Simulated Metrics > Orientation > Landscape. Like this:
If you can't see the Simulated Metrics option, make sure your view is selected in the object hierarchy:
Short answer is (as far as I know) that there is no easy way to do it currently:
What's the best way to handle landscape/portrait differences in IB?