Skip to content

Instantly share code, notes, and snippets.

@sstadelman
Last active November 22, 2016 00:40
Show Gist options
  • Save sstadelman/50cd4bb27915d06df6072a078a0be82d to your computer and use it in GitHub Desktop.
Save sstadelman/50cd4bb27915d06df6072a078a0be82d to your computer and use it in GitHub Desktop.
UIEdgeOffsets for iOS devices in regular horizontal mode
iPhoneSE: portrait UIEdgeInsets(top: 0.0, left: 16.0, bottom: 0.0, right: 16.0) // compact
iPhoneSE: landscape UIEdgeInsets(top: 0.0, left: 20.0, bottom: 0.0, right: 20.0) // compact
iPhone6s: portrait UIEdgeInsets(top: 0.0, left: 16.0, bottom: 0.0, right: 16.0) // compact
iPhone6s: landscape UIEdgeInsets(top: 0.0, left: 20.0, bottom: 0.0, right: 20.0) // compact
iPhone6sPlus: portrait UIEdgeInsets(top: 0.0, left: 20.0, bottom: 0.0, right: 20.0) // compact
iPhone6sPlus: landscape UIEdgeInsets(top: 0.0, left: 32.0, bottom: 0.0, right: 32.0) // regular
iPhone7: portrait UIEdgeInsets(top: 0.0, left: 16.0, bottom: 0.0, right: 16.0) // compact
iPhone7: landscape UIEdgeInsets(top: 0.0, left: 20.0, bottom: 0.0, right: 20.0) // compact
iPhone7Plus: portrait UIEdgeInsets(top: 0.0, left: 20.0, bottom: 0.0, right: 20.0) // compact
iPhone7Plus: landscape UIEdgeInsets(top: 0.0, left: 32.0, bottom: 0.0, right: 32.0) // regular
iPadAir: portrait UIEdgeInsets(top: 0.0, left: 48.0, bottom: 0.0, right: 48.0) // regular
iPadAir: landscape UIEdgeInsets(top: 0.0, left: 176.0, bottom: 0.0, right: 176.0) // regular
iPadAir2: portrait UIEdgeInsets(top: 0.0, left: 48.0, bottom: 0.0, right: 48.0) // regular
iPadAir2: landscape UIEdgeInsets(top: 0.0, left: 176.0, bottom: 0.0, right: 176.0) // regular
iPadPro9.7 portrait UIEdgeInsets(top: 0.0, left: 48.0, bottom: 0.0, right: 48.0) // regular
iPadPro9.7 landscape UIEdgeInsets(top: 0.0, left: 176.0, bottom: 0.0, right: 176.0) // regular
iPadPro12.9 portrait UIEdgeInsets(top: 0.0, left: 176.0, bottom: 0.0, right: 176.0) // regular
iPadPro12.9 landscape UIEdgeInsets(top: 0.0, left: 347.0, bottom: 0.0, right: 347.0) // regular
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment