if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
        {
            NSLog(@"This is an iPhone");
        }
        else
        {
            NSLog(@"This is an iPad");
        }