3 ms·
iOS's adaptive display lumps displays into four different categories. A category can have vastly different screen sizes and even different aspect ratios. They a
by devsquid 11y ago
iOS's adaptive display lumps displays into four different categories. A category can have vastly different screen sizes and even different aspect ratios. They are...
iPad Pro, iPad (portrait, landscape)
iPhone 6 Plus (landscape)
iPhone 6, 5, 4S (landscape)
iPhone 6 Plus, 6, 5, 4S (portrait)
AutoLayout is suppose to fill in the gaps between the different resolutions here, but it doesn't do that great of a job at it. It relies heavily on hardcoded values rather than dynamic values based on the containers size. That coupled with only having 4 distinct size classes makes laying out most views near impossible to rely on AutoLayout alone, you have to manually change the constraints at runtime.
I don't find iOS's layout system to be very adaptive at all. The only thing saving it is there are only 6 different resolutions in the entire eco system. With a huge majority of the users on only one or two of those resolutions.
- nmccormack 11y agoDynamic layout can be created based on the size of the container, but it's not the easiest. The trick is getting used to the multiplier value and, where needed, using extra views as dynamically sized "spacer views". Not ideal I'll admit, but it can still be very powerful when used correctly.