• Previously, designing in iOS was simple as there was only one size of the iPhone is available in the market. But today we are having an array of iPhones and iPads with different sizes. We can see a major change in size from iPhone 5 to iPhone 11 pro max. Each model of iPhones is getting bigger day by day. The size matters a lot in the development process. Apple has introduced Size Classes which organize all of these screen sizes for each device and orientation into two categories.

• regular: If there is enough space in the container to display the content then this is called as Regular.

• compact: if the container space is small to display the content then it is called as compact.

The Compact Size Class refers to a constrained space. It is denoted in Xcode as wC (Compact width) and hC (Compact height).

The Regular Size Class refers to a non-constrained space. It is denoted in Xcode as wR (Regular width) and hR (Regular height).

iPhone Plus and Max Models

So, How to consider regular and compact? The longest dimension is always a regular and shortest dimension is always a compact.

iPhone plus models includes 6/6s/7/8 plus, iPhone XR, iPhone 11 pro max, iPhone 11 XS Max. These all models have width in landscape mode.

All Other iPhone Models

The other, smaller, iPhone models have a trickier set of size classes to remember. The longest dimension of the device is regular in portrait but only compact in landscape.

Thus, tricky part is only with landscap mode. Compact width in landscape for smaller models while Reguler width in landscape with Max models.

iPad Full Screen

A full screen iPad has always a regular height and a regular width size class no matter of orientation.

If there is splitview support application, it has a regular height but width will be compact of both running applications.

iPad landscape

In landscape orientation both positions are supported. It is upto user. He/she can keep whatever suits from both.

The iPad Pro 12.9-inch model is bit different then the smaller ones in landscape. When the screen is evenly split both applications have a regular horizontal size class.

In short when it comes to ipad

• If the apps are running with an even split in landscape, both have compact horizontal and regular vertical size classes.

• If the apps are running with an uneven split in a landscape, the primary app has a regular horizontal class and the second has a compact horizontal size class. Both apps have regular vertical classes.

• If the apps are running with an uneven split in portrait, both apps have compact horizontal size classes and regular vertical size classes.

How affects the size class?

• A font size in ipad or iphone or in landscape mode.

• A view, which will be laid out differently on iPhones when in landscape or portrait mode.

• Configure application when in split view or Slide over.

• To provide additional functionalities in UI when it is in landscape mode. For example: Hidden UI buttons

These things can manage through code but it will be much easier if we manipulate with user Interface Builder.

Using Auto layout and size-class, regardless of devices and orientation you can design an adaptive UI. Adding to that, Apple will tell you if your size class changes.