屏幕旋转方向
2015-10-14 11:46
218 查看
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);}
//- (BOOL)shouldAutorotate
//{
// NSLog(@"让不让我旋转?");
// return YES;
//}
//
//- (NSUInteger)supportedInterfaceOrientations {
// NSLog(@"让我旋转哪些方向");
// return UIInterfaceOrientationMaskAllButUpsideDown;
//}
你可以复写viewcontroller的下面几个模板函数,试试。
- (BOOL)shouldAutorotate
NS_AVAILABLE_IOS(6_0);当前viewcontroller是否支持转屏
- (NSUInteger)supportedInterfaceOrientations;当前viewcontroller支持哪些转屏方向
-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation当前viewcontroller默认的屏幕方向
//- (BOOL)shouldAutorotate
//{
// NSLog(@"让不让我旋转?");
// return YES;
//}
//
//- (NSUInteger)supportedInterfaceOrientations {
// NSLog(@"让我旋转哪些方向");
// return UIInterfaceOrientationMaskAllButUpsideDown;
//}
你可以复写viewcontroller的下面几个模板函数,试试。
- (BOOL)shouldAutorotate
NS_AVAILABLE_IOS(6_0);当前viewcontroller是否支持转屏
- (NSUInteger)supportedInterfaceOrientations;当前viewcontroller支持哪些转屏方向
-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation当前viewcontroller默认的屏幕方向
相关文章推荐
- Java泛型详解
- WebService实战(二)——在Web项目中创建CXF服务
- python脚本使用SFTP下载远程计算机文件
- 关于完美洗牌问题的若干思考(扩展)
- HTML meta viewport属性说明
- 计算机视觉中的曲率尺度空间技术
- Win32 API 心得
- win10自带邮件怎么设置接收网易邮箱邮件?
- Android 工具类 —— 判断网络连接状态、GPS是否打开、基站信息和手机IMSI码
- git之Pushing to the remote branch is not fast-forward错误解决
- 随机数的使用
- static加载问题
- 【总结】Mac版Android Studio常用快捷键总结
- svn 把本地的项目,上传到服务器端
- 响应式网页设计【转载】
- POJ 1007 DNA Sorting
- wireshark cannot find interface
- ArcGIS教程:值提取至点 (空间分析)
- extension=php_phalcon.dll 安装过程
- Mysql修改&设置密码