启动动画的尺寸大小:
LaunchImage320x480.png
LaunchImage640x960.png
LaunchImage640x1136.png
一、ios横竖屏适配解决方案
#pragma mark - 竖屏设置
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
NSLog(@"%s",__FUNCTION__);
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
if (interfaceOrientation == UIInterfaceOrientationPortrait)
{
Landscape=NO;
return (interfaceOrientation == UIInterfaceOrientationPortrait);
} else if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft)
{
Landscape=YES;
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
Landscape=YES;
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
return NO;
}else {
return YES;
}
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
if (toInterfaceOrientation == UIInterfaceOrientationPortrait)
{
Landscape=NO;
} else if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft)
{
Landscape=YES;
}else if (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
Landscape=YES;
}
NSLog(@"%s Landscape:%@",__FUNCTION__,Landscape==YES?@"YES":@"NO");
}
//iOS 7 适配
- (NSUInteger)supportedInterfaceOrientations
{
NSLog(@"%s",__FUNCTION__);
return UIInterfaceOrientationMaskAll;
}
- (BOOL)shouldAutorotate
{
NSLog(@"%s",__FUNCTION__);
return YES;
}