How can I place my code to identify the device in the Extension file?
if UIDevice().userInterfaceIdiom == .pad {
switch UIScreen.main.nativeBounds.height {
case 2048:
print("iPad Pro 9.7/Air")
case 2224:
print("iPad Pro 10.5")
case 2732:
print("iPad Pro 12.9")
displayResultLabel.frame = CGRect(x: 2, y: 90, width: 370, height: 91)
displayResultLabel.font = displayResultLabel.font.withSize(105)
default:
print("unknown")
}
}