Open in app
Home
Notifications
Lists
Stories

Write
Rodion Artyukhin
Rodion Artyukhin

Home

Pinned

Adaptive layout for iOS in Swift

How to adapt views and constraints without size classes — How to adapt a view dynamically in Interface Builder? Using the aspect ratio technique. The idea is to constraint the view to its own aspect ratio and add the additional constraint of equal width or height of superview. The choice of equal width or height depends on the plane based…

I OS

7 min read

Adaptive layout for iOS in Swift
Adaptive layout for iOS in Swift

Dec 1, 2020

Adaptive layout programmatically in Swift

How to adapt constants and views dynamically — This article is based on my previous one, so before moving on, I’d recommend you to read it first: Adaptive layout for iOS in Swift How to adapt views and constraints dynamically both in storyboard and programaticallyrodionartyukhin.medium.com Note I’ll be using SnapKit in my code, but the approach can be applied to other layout libraries as well as Apple’s NSLayoutConstraint and SwiftUI.

Programming

4 min read

Adaptive layout programmatically in Swift
Adaptive layout programmatically in Swift
Rodion Artyukhin

Rodion Artyukhin

iOS Developer. Work and enjoy life.

Following
  • Finsi Ennes

    Finsi Ennes

  • Anurag Ajwani

    Anurag Ajwani

  • Dylan Chen

    Dylan Chen

  • Uday Hiwarale

    Uday Hiwarale

  • Stan Ostrovskiy

    Stan Ostrovskiy

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable