GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cruisediary/DeviceLayout: 📱AutoLayout can be set differently for each device

This repository was archived by the owner on Nov 2, 2025. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

64 Commits
64 Commits

Folders and files

NameName
Last commit message
Last commit date
Carthage/Checkouts/Device
Carthage/Checkouts/Device
 
 
DeviceLayout.xcodeproj
DeviceLayout.xcodeproj
 
 
DeviceLayout
DeviceLayout
 
 
DeviceLayoutTests
DeviceLayoutTests
 
 
README
README
 
 
Sources
Sources
 
 
.gitignore
.gitignore
 
 
.swift-version
.swift-version
 
 
.travis.yml
.travis.yml
 
 
Cartfile
Cartfile
 
 
Cartfile.resolved
Cartfile.resolved
 
 
DeviceLayout.podspec
DeviceLayout.podspec
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

DeviceLayout

logo

Carthage compatible Swift CI Status Version License Platform

DeviceLayout is a Swift framework that lets you set Auto Layout constraints's differently for each device

Using only IBInspector of Xcode to set up your constant per device size differently without any CODE :)

@IBInspectable make a migic with outh any CODE

Only 3 seconds you can set design guide and make designer happy 🚀

public enum Size: Int, Comparable {
    case unknownSize = 0
    /// iPhone 4, 4s, iPod Touch 4th gen.
    case screen3_5Inch
    /// iPhone 5, 5s, 5c, SE, iPod Touch 5-6th gen.
    case screen4Inch
    /// iPhone 6, 6s, 7, 8
    case screen4_7Inch
    /// iPhone 6+, 6s+, 7+, 8+
    case screen5_5Inch
    /// iPhone X, Xs
    case screen5_8Inch
    /// iPhone Xr
    case screen6_1Inch
    /// iPhone Xs Max
    case screen6_5Inch
    /// iPad Mini
    case screen7_9Inch
    /// iPad
    case screen9_7Inch
    /// iPad Pro (10.5-inch)
    case screen10_5Inch
    /// iPad Pro (11-inch)
    case screen11Inch
    /// iPad Pro (12.9-inch)
    case screen12_9Inch
}

Example

First inherit your constraint to DeviceLayoutConstraint

logo

Second Set your own constant per device size and adjust your UI design guide

comparing PSD, Sketch or Zeplin UI Guide

Make designer be happy :)

logo

Requirements

  • iOS 8.0+
  • Swift 3+, 4+, 5+

Installation

📲 Installation

DeviceLayout is available through Cocoapods or Carthage

pod "DeviceLayout"

Carthage

github "cruisediary/DeviceLayout" ~> 0.5.0

Dependencies

  • Device - Light weight tool for detecting the current device and screen size written in swift.

👨‍💻 Author

cruz, [email protected]

🛡 License

DeviceLayout is available under the MIT license. See the LICENSE file for more info.

About

📱AutoLayout can be set differently for each device

Topics

autolayoutdevicedevicelayoutiosresolutionswiftui

Resources

Readme
MIT license
Activity

Stars

162 stars

Watchers

1 watching

Forks

16 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.