CHECK IOS6 & IOS7 WITH iPhone 4 or 5

=>CGRect screenBounds = [[UIScreen mainScreen] bounds];
if(screenBounds.size.height == 568)
{
//    iPhone 5
}
else
{
//    iPohne 4 and Older iPhones
}

=>CHECK IOS VERSION

 if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {
            // > iOS7
            NSLog(@”iOS7″);
            
        } else {
            
            // <= iOS6
            NSLog(@”iOS6″);

        }

 

 

=================CHECK iPHONE or iPAD

=>Check Device iPhone or iPad

//In  AppDelegate.h
int checkDevice;
// In AppDelegate.m
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){
checkDevice = 1; //For iphone
}
else
{
checkDevice = 2; //For iPad
}

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s