iOS 8 size classes for iPad landscape [duplicate] - ios

This question already has answers here:
Sizing class for iPad portrait and Landscape Modes
(7 answers)
Closed 7 years ago.
It seems all the current iOS devices maps to the new iOS 8 size classes nicely except iPad landscape? I seem not able to figure out how to use the size class feature to draw a different scene for iPad landscape (different from iPad portrait)?
Is that intended by design in Apple's mind or am I miss something about the iOS size classes?

It appears to be Apple's intent to treat both iPad orientations as the same -- but as a number of us are finding, there are very legitimate design reasons to want to vary the UI layout for iPad Portrait vs. iPad Landscape.
However, I believe I have an answer for adapting size classes to do just what you need.
Please see: https://stackoverflow.com/a/28268200/4517929

It seems to be by design (which I think we can all agree is lame). You'll probably have to resort to doing things in code for iPad landscape layout by checking something like
UIApplication.sharedApplication().statusBarOrientation.isLandscape

Related

Why ViewControllers don't completely fit the screen in an iPad? [duplicate]

This question already has an answer here:
iPad screen doesn't support autolayout
(1 answer)
Closed 4 years ago.
When I launch my app in an iPhone, the UIViewControllers fit the screen. But in an iPad, the result is this:
The UIViewControllers don't fit the screen. Why is this happening?
Thats probably because use set iPhone as device in deployment info of general tab in target settings.
iPad can open iPhone apps by default but without any modification on it's layout. then you have a button on lower right corner to zoom in.
If you want your app to support both iPad and iPhone in a native way, you should pick universal. BUT BE CAREFUL! Once you pick universal and upload it tho appstore, there is no way back to change it to single mode (iPhone/iPad only) and you shod continue supporting all platforms. The only way is to delete project entirely and create new one and it means that you may loose all of your users by loosing continues delivery.

Landscape only on XCode 6

Hi so I've been playing around with XCode and can't seem to figure out how to make an application landscape only. Wondering if there is a simple/storyboard solution.
I've tried checking the landscape left and landscape right and unchecking the portrait on the general page under "device orientation".
However this strangely just displays the w Compact h Regular set up on my storyboard horizontally (as opposed to showing the W Any h Compact set up). I mean technically I can work around this, but it seems annoying/inefficient to rotate my head 90 degrees while working on the portrait settings.
If there is only solution in code, I would appreciate it in swift!
EDIT: Hmmm, after some testing it seems as if the phone I'm testing on only shows the rotated version of the portrait settings. It's an iPhone 4 and maybe outdated for handling 2 seperate set ups for portrait and landscape.
Thanks!
Just for anyone with this problem in the future, here's the problem:
The storyboard editor by default will display the editor as any by any, as it should. Size classes should ONLY be used when you need to change something specifically for one kind of size class (in other words, things that will be different on different devices. You should still edit everything in the any x any orientation, and regardless of if it's landscape only because size classes will still change from device to device for landscape orientation.
It's an iPhone 4 and maybe outdated for handling 2 seperate set ups for portrait and landscape
That could be it. Size Classes were invented in iOS 8. So on a system earlier than iOS 8, they are not supported, and your results will be, shall we say, unpredictable.

UINavigationBar Weird Standard Height [duplicate]

This question already has answers here:
How to enable native resolution for apps on iPhone 6 and 6 Plus?
(8 answers)
Closed 7 years ago.
I am confused when I see my app's UINavigationBar's height. It seems to be taller than other apps and the size of it's Status Bar font is bigger than other apps
Please take a look at the screenshots below. I did not do anything to my app's NavigationBar.
What could possibly caused this?
Thoughts??
Thank you!!!!
I'm guessing those screen shots are on an iPhone 6. So evidently your app is not iPhone 6 native. Therefore it is portrayed as an iPhone 5 app, zoomed - hence larger.
This is a pity because you are not getting all the pixels you are entitled to (and also I believe it won't get past the gatekeepers at the App Store).
It's kind of a long-shot But conform to the UINavigationBarDelegate and try implementing this method
- (UIBarPosition)positionForBar:(id<UIBarPositioning>)bar {
return UIBarPositionTopAttached;
}
The greater likelihood is that it is scaling to fit a 6 / 6+ in which case you need to add the proper launch image assets.

Can I put more content on iPhone 5 than on Iphone 4?

I am developing an app and in one of the views the 4inch screen would fit the content I want to include just fine but the 3.5 inch screen is just too small so I wanted to remove a part of the content for that screen size.
So the question is: Do apple allow the bigger screens to have more content than the smaller screens? I guess this question also applies to ipad vs iphone, iphone 6 vs iphone 5 , etc...
I have never seen this even being discussed and I've never done it myself but always wondered.
Naturally I would do it in a way that the 3.5 inch screen wouldn't miss anything too important and in a way that the content would be completely hidden on the iphone 4 and the design doesn't suffer. In this particular case I would just remove an ad for another app so the iphone 4 users would probably thank me ;)
Thanks in advance
Welcome to Stack Overflow. This isn't really a programming question the way SO defines it, but I'll take pity on you since you're new.
Yes of course. You always have to tailor your UI for the target device. That often means stripping away non-essential elements from smaller screens.
For iPhone vs. iPad it usually means presenting more on one screen on iPad and multiple screens on iPhone.

Telling the difference between portrait and landscape iPad with Size Classes

How do you tell the difference between an iPad in portrait and landscape via Size Classes, if the are both in regular horizontal size and regular vertical size???
It appears to be Apple's intent to treat both iPad orientations as the same - but as a number of us are finding, there are very legitimate design reasons to want to vary the UI layout for iPad Portrait vs. iPad Landscape.
For answer to your question you can find it here.

Resources