Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOS difference in using Compact Regular and Compact Any Size classes

I had made an application on ios for iphones portrait mode only by using Compact Any Size Classes .. its working perfectly on types of phones.

But XCode storyboard prefers to use compact Regular Size classes for all iphone portrait mode.

I am unable to differenciate in them .. if I am using wrong size classes. Please someone explain with detail and reasons that which size classes I should use.

I had Read that storyboards using Any| Any size classes will work on all screen sizes including iphone 6 plus and ipad devices.

So why should it not Compact| any will not preferrable to all iphones in portrait. Please guide

like image 389
ShujatAli Avatar asked Dec 04 '14 05:12

ShujatAli


1 Answers

Compact Width | Regular Height is the best suited SizeClass as per your requirement to handle all iPhone models with Portrait only mode.

Choosing a right Size class will allow to make xCode the best prediction about the screen on which the layout would be drawn. So Its better to be most accurate about it.

From: https://developer.apple.com/library/ios/recipes/xcode_help-IB_adaptive_sizes/chapters/SelectingASizeClass.html

For example, when you select Compact Width | Regular Height, changes to layout constraints and views apply exclusively to iPhone devices in portrait orientation.

enter image description here


More Details:

In fact, here is a nice pictorial view of size class usage:

enter image description here

like image 103
bllakjakk Avatar answered Sep 28 '22 22:09

bllakjakk