Auto Layout

In addition to view animations, which can be performed using different techniques and APIs (View animation using UIMotionEffect, UIKit Dynamics overview]), it is possible to create custom animations for the transitions between view controllers. Navigating from one view controller to another is driven by animations since the oldest iOS versions. The default animations have become Continue reading…

In the last blog post I explained several techniques for debugging Auto Layout issues using the storyboards in development mode and the Xcode console at runtime. Each of these techniques has its limitations: the storyboards are rarely used to entirely define the UI , especially when the view hierarchy starts to become a bit complex. Continue reading…

Applying the Adaptive Layout principles in designing app user interfaces means relying on Auto Layout for sizing and placing the views on screen the right way. With the multiplication of screen sizes, resolutions and devices to support, iOS developers are forced to embrace the Auto Layout technology and abandon the old techniques of manually setting Continue reading…

As explained in the Part 1 of this adaptive layout series, the size classes give an approximate idea about the horizontal and vertical dimensions of that object (width and height). They are returned by the traitCollection property of any object that conforms to the UITraitEnvironment protocol, like UIView or UIViewController instances. The size classes don’t Continue reading…

The principals and goals of the adaptive layout in mobile design and the responsive layout in Web design are very similar. Their main purpose is to create user interfaces that readjust automatically to the screen size so the content is presented in the optimal conditions for the user. The tools and techniques for creating adaptive Continue reading…

Since 2007 and the first generation of iPhone, with its 3.5-inch screen and 320×480 pixel resolution, Apple has continuously accelerated the release cycle of new devices and families of devices with different screen sizes, resolutions and pixel densities, and there is no sign of slowing down. The successive iOS versions followed along, but before iOS6 Continue reading…

Animations are an essential aspect of iOS and have become increasingly important in its latest versions. Besides providing a fun and immersive user experience, they play a major role in highlighting through motion the important parts of the content and complement the static hierarchy of information. There are multiple ways views can be animated in Continue reading…

As its name suggests, the purpose of the scroll view is to present content that is larger than the visible area on the screen. The hidden content is revealed by scrolling horizontally and / or vertically using the pan gesture, which is natively supported by the UIScrollView class. Because the content can be any size Continue reading…

This article is the logical continuation of the blog post I’ve written last week about the self-sizing cell in tableviews. This time we will take a close look at the auto-adapting cells in collections views. The sample project is available for download on GitHub. Before going further, you should know that self-sizing cells are supported Continue reading…

Table views are one of the most commonly used UI components in iOS apps. They usually display text with varying lengths. Prior to iOS7, developers had to calculate the height of each cell to accommodate to its content, and provide it in the table view delegate method -tableView:heightForRowAtIndexPath:. Now the cells self-sizing behavior can be Continue reading…