Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 2, 2025. It is now read-only.

📱AutoLayout can be set differently for each device

License

NotificationsYou must be signed in to change notification settings

cruisediary/DeviceLayout

Repository files navigation

logo

Carthage compatibleSwiftCI StatusVersionLicensePlatform

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

Using onlyIBInspector 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 🚀

publicenumSize: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, 8case screen4_7Inch    /// iPhone 6+, 6s+, 7+, 8+case screen5_5Inch    /// iPhone X, Xscase screen5_8Inch    /// iPhone Xrcase screen6_1Inch    /// iPhone Xs Maxcase screen6_5Inch    /// iPad Minicase screen7_9Inch    /// iPadcase 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 toDeviceLayoutConstraint

logo

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

comparingPSD,Sketch orZeplin UI Guide

Make designer be happy :)

logo

Requirements

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

Installation

📲 Installation

DeviceLayout is available throughCocoapods orCarthage

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,cruzdiary@gmail.com

🛡 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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp