I want, in Swift, to have a different code if the device is an iPhone (or iPod) and a different code if it's an iPad. And also a different code if the screen's size is 3,5 or 4,0.
I can do it in Objective-C with this code:
iPhone or iPad:
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {}
else {}
But I don't know how I can do these 2 conditions in Swift. The same doesn't work.
Thank's a lot.
Gilles