Find the Screen Size
CGSize result = [[UIScreen mainScreen] bounds].size;
Find the System Name
#import <sys/utsname.h>
-(void)findversiondetails
{
//Find device type
struct utsname systemInfo;
uname(&systemInfo);
NSString *deviceModel = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
if ([deviceModel isEqualToString:@"iPhone4,1"] || [deviceModel isEqualToString:@"iPhone3,3"] || [deviceModel isEqualToString:@"iPhone3,2"] || [deviceModel isEqualToString:@"iPhone3,1"])
{
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Title" message:deviceModel delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}
}
No comments:
Post a Comment