I am using both device for make my application.my application is perfectly run in iPad but when i select device as iPhone 4inch there is an error occur in interface.below is picture. you can see black color in top and bottom where did it came from?
and here is my code:
in app delegate:
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
if([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad)
{
NSLog(@"Ipad ");
[application setStatusBarStyle:UIStatusBarStyleLightContent];
self.window.clipsToBounds =YES;
self.window.frame = CGRectMake(0,-20,self.window.frame.size.width,self.window.frame.size.height+20);
}
if
(IS_IPHONE_5)
{
NSLog(@"Iphone %f ",[[UIScreen mainScreen] bounds].size.height);
if ([[UIScreen mainScreen] bounds].size.height == 568) {
[application setStatusBarStyle:UIStatusBarStyleLightContent];
self.window.clipsToBounds =YES;
self.window.frame = CGRectMake(0,-20,self.window.frame.size.width,self.window.frame.size.height+20);
}
}
}