I\'ve just upgraded to XCode 4.5 GM and found out that you can now apply the \'4\" Retina\' size to your view controller in the storyboard.
Now if I want to create a
In Swift 3 you can use my simple class KRDeviceType.
https://github.com/ulian-onua/KRDeviceType
It well documented and supports operators ==, >=, <=.
For example to detect if device has bounds of iPhone 6/6s/7, you can just use next comparison:
if KRDeviceType() == .iPhone6 {
// Perform appropiate operations
}
To detect if device has bounds of iPhone 5/5S/SE or earlier (iPhone 4s) you can use next comparison:
if KRDeviceType() <= .iPhone5 { //iPhone 5/5s/SE of iPhone 4s
// Perform appropiate operations (for example, set up constraints for those old devices)
}