#define degreesToRadians(x) (M_PI * x / 180.0)
- (void)viewWillAppear:(BOOL)animated
{
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];
CGRect newBounds = CGRectMake(0, 0, 480, 320);
self.navigationController.view.bounds = newBounds;
self.navigationController.view.center = CGPointMake(newBounds.size.height / 2.0, newBounds.size.width / 2.0);
self.navigationController.view.transform = CGAffineTransformMakeRotation(degreesToRadians(90));
[super viewWillAppear:animated];
}
- (void)viewWillDisappear:(BOOL)animated
{
self.navigationController.view.transform = CGAffineTransformIdentity;
self.navigationController.view.transform = CGAffineTransformMakeRotation(degreesToRadians(0));
self.navigationController.view.bounds = CGRectMake(0.0, 0.0, 320.0, 480.0);
[super viewWillDisappear:animated];
}
分享到:
相关推荐
ios的app的navigation bar的代码的实现。
Android 使用BottomNavigationView实现底部导航栏,在Android Support Library 25 中增加了 BottomNavigationView 控件,官方为我们提供了这样这一个控件。
一个示例App展示了如何使用NavigationUI库将BottomNavigationView和NavigationView与导航图挂钩
Kotlin中使用BottomNavigationView实现底部导航+小红点消息提示
android navigation bar 的一些资料
NavigationView的使用
android NavigationView的使用
BottomNavigationView大于3个菜单项时去除动画效果,显示菜单项的文字. 如果没有资源分下载的,留一个邮箱,看到后,我把代码发到指定邮箱
侧滑菜单NavigationView的使用,根据个人的使用情况,进行适当的修改
通过自定义BottomNavigationView +menu 快速实现底部栏切换 ,并可以结合ViewPager +Fragment ,代码量少,实现方便
ToolBar+DrawerLayout + NavigationView
Android Material Design之TabLayout + NavigationView联合使用
NavigationView和DrawerLayout的结合
NavigationView在Toolbar下方
通过使用Fragment+BottomNavigationView共同实现Android底部导航栏的demo,解压后就可以打开,开发环境是Android Studio,CSDN不知道怎么设置下载C币和积分,需要的话联系我邮箱也行,我直接发给你,kuaijian.huc@qq...
Floating Navigation View A simple Floating Action Button that shows an anchored Navigation View and was inspired by Menu Material Fixed created by Tommaso Poletti Installation Include the library in ...
BottomNavigationView实现material design 的tab选项卡效果
一个BottomNavigationView + viewPager的简单应用实例,实现固定title和ViewPager交互功能
Android BottomNavigationView 的使用 Android BottomNavigationView 的使用 Android BottomNavigationView 的使用 https://blog.csdn.net/nicepainkiller/article/details/85053870 ...
将介绍使用Google最新推出规范式设计中的NavigationView和DrawerLayout结合实现侧滑菜单栏效果