Basem Emara

Mobile Architect / iOS Jedi

  • About
  • Portfolio
  • Contact

Connect

  • GitHub
  • LinkedIn
  • Twitter

Percentage-based Spacing Using Autolayout and Storyboard

June 28, 2016 By Basem Emara 3 Comments

This entry is part 2 of 6 in the series Swift Utility Belt Series

Due to the many screen sizes in the mobile world, staying relative to screen size is crucial. Hard-coding margins and sizes based on points can be short-sighted. In this post, we will subclass NSLayoutConstraint to achieve percentage-based margins.

Filed Under: Mobile Tagged With: auto-layout, ios, responsive-design, xcode

My Life Philosophy

Simplicity is the key to elegance.

Post Series

  • Building a Scalable iOS App
  • Swift Utility Belt

Popular Posts

  • Creating Thread-Safe Arrays in Swift
  • Creating Cross-Platform Swift Frameworks for iOS, watchOS, and tvOS via Carthage and CocoaPods
  • Memory Leaks and Resource Management in Swift and iOS
  • So Swift, So Clean Architecture for iOS
  • Reading values from any plist file or bundle in Swift

Mobile App

Download the Basem Emara Blog app

Find It