Skip to content

Commit

Permalink
add iPhone 14 Pro iPhone 14 Pro Max
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiang1994 committed Sep 14, 2022
1 parent 59c4a10 commit a052a27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions Sources/Screen/UIAdapter.Screen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
// Copyright © 2018年 lee. All rights reserved.
//

// https://www.screensizes.app
// https://useyourloaf.com/blog/iphone-14-screen-sizes/?continueFlag=d151fc49ec5161587c30f15faea0bee9

import Foundation

#if os(iOS)
Expand Down Expand Up @@ -128,8 +131,10 @@ extension UIAdapter.Screen {
case _320 = 320
case _375 = 375
case _390 = 390
case _393 = 393
case _414 = 414
case _428 = 428
case _430 = 430

public static var current: Width {
guard !isPlus else { return ._414 }
Expand All @@ -145,8 +150,10 @@ extension UIAdapter.Screen {
case _736 = 736
case _812 = 812
case _844 = 844
case _852 = 852
case _896 = 896
case _926 = 926
case _932 = 932

public static var current: Height {
guard !isPlus else { return ._736 }
Expand Down Expand Up @@ -191,13 +198,13 @@ extension UIAdapter.Screen {
case (375, 812, 3):
return ._5_8

case (414, 896, 2), (390, 844, 3):
case (414, 896, 2), (390, 844, 3), (393, 852, 3):
return ._6_1

case (414, 896, 3):
return ._6_5

case (428, 926, 3):
case (428, 926, 3), (430, 932, 3):
return ._6_7

default:
Expand Down Expand Up @@ -228,7 +235,7 @@ extension UIAdapter.Screen {
case (320, 568), (375, 667), (414, 736):
return .regular

case (375, 812), (414, 896), (390, 844), (428, 926):
case (375, 812), (414, 896), (390, 844), (393, 852), (428, 926), (430, 932):
return .full

default:
Expand Down
2 changes: 1 addition & 1 deletion UIAdapter.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "UIAdapter"
s.version = "1.1.0"
s.version = "1.2.0"
s.summary = "iOS屏幕适配工具"

s.homepage = "https://github.com/lixiang1994/UIAdapter"
Expand Down

0 comments on commit a052a27

Please sign in to comment.