UINavigationController
2015-07-08 21:58
453 查看
UINavigationController处理屏幕旋转A simple UINavigationController subclass to handle iOS 6’s orientation changes better
#import <UIKit/UIKit.h> @interface CJProperRotationNavigationController : UINavigationController @end #import "CJProperRotationNavigationController.h" @implementation CJProperRotationNavigationController - (BOOL)shouldAutorotate { if (self.topViewController != nil) return [self.topViewController shouldAutorotate]; else return [super shouldAutorotate]; } - (NSUInteger)supportedInterfaceOrientations { if (self.topViewController != nil) return [self.topViewController supportedInterfaceOrientations]; else return [super supportedInterfaceOrientations]; } - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { if (self.topViewController != nil) return [self.topViewController preferredInterfaceOrientationForPresentation]; else return [super preferredInterfaceOrientationForPresentation]; } @end
相关文章推荐
- js传中文参数controller里获取参数乱码问题解决方法
- Samba NT Domain Controller
- yii框架配置默认controller和action示例
- AngularJs根据访问的页面动态加载Controller的解决方案
- JFina教程JfinalUIB 代码笔记 (3)--- jfinal Controller参数封装
- springMVC参数传递(一)
- Grails 1.2参考文档速读(10):Controller
- Spring Controller 添加多个 Validators
- angularjs(step by step):controller
- AngularJS控制器
- 多个控制器
- Controller and Concurrency
- Controller and Concurrency
- Jfinal中Controller注意事项
- Spring Aop自定义注解拦截Controller实现日志管理
- ASP .NET MVC5 添加一个控制器
- .Net MVC5 Controller
- Maven 构建 Struts2 实现 基本 CURD Controller
- angularJS控制器controller之间的3种通信方式
- Angularjs Controller 间通信机制($on, $emit, $broadcast)