Saber si es iOS7 y Tamaño de pantalla 3.5 o 4

#define IS_DEVICE_RUNNING_IOS_7_AND_ABOVE() ([[[UIDevice currentDevice] systemVersion] compare:@"7.0" options:NSNumericSearch] != NSOrderedAscending) #define iPhone4Or5oriPad ([[UIScreen mainScreen] bounds].size.height == 568 ? 5 : ([[UIScreen mainScreen] bounds].size.height == 480 ? 4 : 999)) if (iPhone4_or_iPhone5_or_iPad == 4) { NSLog(@"This is 3.5 inch iPhone - iPhone 4s or below"); } else if (iPhone4_or_iPhone5_or_iPad == 5) { NSLog(@"This is 4 inch iPhone - iPhone 5 & above"); } else { NSLog(@"This is iPad"); }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.