Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Как определить размер экрана iPad и задать действия в зависимости от этого размера.
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
You can’t perform that action at this time.