Try this way..
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
{
CGRect screenBounds = [[UIScreen mainScreen] bounds];
if (screenBounds.size.height ==568)
{
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPhone5" bundle:nil];
}
else
{
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPhone4" bundle:nil];
}
Updated Answer
check this... Black Screen for screen detection