Created
May 31, 2019 08:15
-
-
Save amirhanov/564e71e42684043f9a11e00ff0e6252e to your computer and use it in GitHub Desktop.
Как определить размер экрана iPad и задать действия в зависимости от этого размера.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if UIDevice().userInterfaceIdiom == .pad { | |
switch UIScreen.main.nativeBounds.height { | |
case 2048: | |
// iPad Air 2, Pro 9,7 | |
case 2224: | |
// iPad Pro 10,5 | |
case 2388: | |
// iPad Pro 11 | |
case 2732: | |
// iPad Pro 12,9 | |
default: | |
print("iPad Air1 , Mini 1- 4") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment