How to check what iDevice your using and adjust GUI sizes according...

How would I check what iDevice I am on, and then change my guiElements accordingly? Would I do something like:

if(iPhoneGeneration.iPhone4){
  // set up for retina
}
else{
//set up for non-retina
}

Also, does iPhone4 include iPhone 4S?

EDIT: Is there a way to publish only for iPhone 4’s and above?

if (iPhone.generation == iPhoneGeneration.iPhone4S)
{

}
else
{
}