He is a quick way to separate iPhone 4 / iPhone 3 code snippets.
float version = [[[UIDevice currentDevice] systemVersion] floatValue]; if (version >= 3.0) { // add your code for iphone 4 (retina display!) } else { // add your code for iphone 3/3Gs }