ios6.0之后单个屏幕旋转,不用根视图以及Application windows are expected to have a root view controller at the end of
2013-05-27 17:13
656 查看
ios6.0之后的屏幕旋转: 之前6.0之前的方法是- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return toInterfaceOrientation == UIInterfaceOrientationLandscapeRight ;
}
但是ios6.0之后就不支持了,不过要实现两个方法:
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
//这里要注意的是不要用了UIInterfaceOrientationLandscapeRight,这个属性不支持,由于我的大意搞了很久才发现了
return UIInterfaceOrientationMaskLandscapeRight;
}
现在运行,屏幕就会向右旋转了..
Application windows are expected to have a root view controller at the end of application launch 运行项目的时候出现了这个提示:
解决办法是: self.window.rootViewController = navigation;
不能用 [self.window addSubview:navigation.view] 这个方法了.
{
return toInterfaceOrientation == UIInterfaceOrientationLandscapeRight ;
}
但是ios6.0之后就不支持了,不过要实现两个方法:
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
//这里要注意的是不要用了UIInterfaceOrientationLandscapeRight,这个属性不支持,由于我的大意搞了很久才发现了
return UIInterfaceOrientationMaskLandscapeRight;
}
现在运行,屏幕就会向右旋转了..
Application windows are expected to have a root view controller at the end of application launch 运行项目的时候出现了这个提示:
解决办法是: self.window.rootViewController = navigation;
不能用 [self.window addSubview:navigation.view] 这个方法了.
相关文章推荐
- iOS每次启动都提示:Application windows are expected to have a root view controller at the end of application
- “Application windows are expected to have a root view controller at the end of application launch”
- 'Application windows are expected to have a root view controller at the end of application launch'
- Application windows are expected to have a root view controller at the end of application launch'
- Application windows are expected to have a root view controller at the end of appliaction launch.
- 'Application windows are expected to have a root view controller at the end of application launch' [
- Application windows are expected to have a root view controller at the end of application launch问题分析
- Application windows are expected to have a root view controller at the end of application launch
- iOS 9出现错误Applications are expected to have a root view controller at the end of application launch
- Application windows are expected to have a root view controller at the end of application launch 的解决
- Application windows are expected to have a root view controller at the end of application launch
- 关于Application windows are expected to have a root view controller at the end of application launch
- Application windows are expected to have a root view controller at the end of application launch
- Application windows are expected to have a root view controller at the end of application launch解决方法
- Application windows are expected to have a root view controller at the end of application launch
- 'Application windows are expected to have a root view controller at the end of application launch'
- 在写引导页面时,出现Application windows are expected to have a root view controller at the end of application
- Application windows are expected to have a root view controller at the end of application launch
- Application windows are expected to have a root view controller at the end of application launch
- Application windows are expected to have a root view controller at the end of appliaction launch.