iOS6以上屏幕旋转详解

LLC混合滞回控制 vs 电压模/电流模:UCC25640x仿真对比与选型指南 在开关电源设计中,LLC谐振变换器的环路补偿是核心难点。传统电压模控制(VMC)和电流模控制(CMC)在LLC拓扑上存在环路增益漂移、动态响应慢等局限。混合滞回控制通过滞回比较器直接调制开关频率,并融合输出电压与谐振腔电流信息,实现了自适应环路增益和快速瞬态响应。该技术显著提升轻载效率与动态性能,适用于高密度适配器、快充及车载充电机等场景。本文基于UCC25640x系列,通过仿真对比三种控制策略,为工程选型与调试提供实践参考。 阅读详情

屏幕旋转的研究理由:

因为本人从事视频类的iOS开发工作,经常项目中经常会遇到需要在不同的页面对屏幕方向进行控制,例如正常的列表页面都只支持竖屏不能旋转,而播放页面需要能够控制旋转 :
- 手动点击全屏进入全屏并保持全屏不自动旋转;
- 旋转屏幕能够屏幕能够自动旋转。

相信很多人也在屏幕旋转上遇到过不同的疑惑与阻碍,下面介绍实现方式,以及遇到的坑。


屏幕旋转基础


我们能在工程的General里面设置app的方向,如果你全不选似乎是跟全选是一样的效果。
然后是我们在AppDelegate里也能设置这个属性。

我们在这里把这个方向Mark一下:Orientation_App_Support

- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
   //返回你的app支持的旋转方向。
    return  XXX ;
}

我们再看看我们的控制器里面3个方法

- (BOOL)shouldAutorotate {
    //确定你的控制器是否能够旋转(手动控制,或者自动旋转都要Return YES)
    return XXX;
}

#if __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_9_0
- (NSUInteger)supportedInterfaceOrientations {
#else
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
#endif
    //返回你的屏幕支持的方向
    return XXX;
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    //你跳转(present)到这个新控制器时,按照什么方向初始化控制器
    return XXX;
}

这里我们要进行第二和第三个标记了:
- Orientation_VC_Support
- Orientation_Presentation

Orientation_VC_Support是我们当前控制器支持的方向。
由下面这个方法返回

- (UIInterfaceOrientationMask)supportedInterfaceOrientations

Orientation_Presentation是我们跳转到某一个控制器时,控制器初始化展示的屏幕方向。
由下面这个方法返回

-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation 

介绍完三个标记,我们来看我们怎么通过这个三个标记来控制我们的控制器旋转

这里就要说一下了,当我们跳转的时候,会先进入一次新控制器的这个方法(只会进入一次,用于跳转到新控制器的时候初始化新控制器方向Orientation_Presentation)

-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
//返回Orientation_Presentation

Orientation_Presentation必须是Orientation_VC_Support中的一种(只能是一种,不能用|的方式返回多个方向,否则必崩)。
假设你的Orientation_VC_Support不支持Orientation_Presentation,那么你会获得崩溃

Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'preferredInterfaceOrientationForPresentation must return a supported interface orientation!'

/*Orientation_Presentation写成如下方式
  return UIInterfaceOrientationLandscapeLeft | UIInterfaceOrientationPortrait;
  即使你的Orientation_VC_Support是所有的方向也会出现如上错误
  Orientation_Presentation有且只能是一个
  UIInterfaceOrientation是不允许用|的
  UIInterfaceOrientationMask才允许用|
  在枚举里面使用或的问题可以自己另外去研究一下位运算
*/

好的preferredInterfaceOrientationForPresentation这个方法的用途以及如何避免上面这个crash应该解释的很清楚了。


接下来是控制我们控制器旋转的三个方法(iOS6以上,iOS6以下的旋转不再赘述)

注意注意注意!!!
请关闭你的iPhone的锁屏,不然你怎么旋转都不会起作用的
从iPhone底部上滑,拉出菜单,关闭锁屏

- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
//返回Orientation_App_Support
- (BOOL)shouldAutorotate;
//返回是否可以旋转
#if __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_9_0
- (NSUInteger)supportedInterfaceOrientations;
#else
- (UIInterfaceOrientationMask)supportedInterfaceOrientations;
#endif
//返回Orientation_VC_Support

进入第一个和第三个方法的前提,是我们第二个方法要返回YES。
也就是说,当我们的控制器支持自动旋转,并且设备将要旋转到另一个方向,才会调用第一个和第三个方法,来判断是否旋转到将要旋转的方向。


再接下来,讲一个比较重要的点
- - 为何我的控制器的这些方法都没有被调用?

如果你的控制器里这些方法没有被调用,我猜想99%的原因都是因为这个:
— — 容器

咱们常用的容器类型控制器有两种:
- UITabBarViewController
- UINavigationController

假如你在工程里使用了这些容器来控制你的页面架构,那么你的当前显示的控制器是否可以旋转,以及能够旋转到什么方向,都是由你的最底层容器控制的。

  • 你的页面架构是建立在一个navigation上的,那么在这navigation上push/pop的所有视图的旋转方向都是根据这个navigationController所支持的方向确定的。
  • 你的页面架构是建立在一个tabBarController上的,那么你的所有childViewControllers的旋转方向都是根据tabBarController所支持的方向确定的。

也就是说,如果你的ViewController放在在一个容器里,他的旋转方向就会受到容器的控制,而不是自己控制。

因此,在这样有容器存在的页面构造里,我们能够通过继承的方式自定义容器子类,在自定义容器类中控制我们的页面旋转。这样自定义容器还可以在自定义容器类中,将容器控制旋转转化成当前控制器控制旋转

举一个栗子,假设我们底层容器是一个TabBarController,TabBarController里的ChildViewController,都是NavigationContoller容器。

/*自定义的TabBarController.m*/
- (BOOL)shouldAutorotate {
    return [self.selectedViewController shouldAutorotate];
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    return [self.selectedViewController preferredInterfaceOrientationForPresentation];
}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    return [self.selectedViewController supportedInterfaceOrientations];
}
/*自定义的NavigationController.m*/
- (BOOL)shouldAutorotate {
    return [self.topViewController shouldAutorotate];
}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    return [self.topViewController supportedInterfaceOrientations];
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    return [self.topViewController preferredInterfaceOrientationForPresentation];
}

像上面这样定义好两个容器类,即可将容器控制旋转方向,转化为当前显示的控制器控制旋转方向。

这里有个小坑:
      假设这里有个场景:一个独立的页面(例如登陆页面)跳转到一个tabBarViewController页面。
      你会发现不论你怎么改都会报错:
         Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'preferredInterfaceOrientationForPresentation must return a supported interface orientation!'
      这是为什么呢?这是因为你tabBarViewController初始化的时候并没有赋值self.selectedViewController。
      而在supportedInterfaceOrientations和preferredInterfaceOrientationForPresentation中调用了self.selectedViewController的方向,返回值理所当然就导致两者无法像之前原理中所说的一样匹配。
      因此,你在构造完childViewControllers之后,需要给selectedIndex赋值,让selectedViewController不为空。
      建议如下在init方法中构建TabBarViewController的childViewControllers。

- (instancetype)init {
    if (self = [super init]) {
        [self setupViewControllers];
        self.selectedIndex = 0;
    }
    return self;
}

然后就是自定义我们的UIViewController了。

/*自定义的ViewController*/
- (BOOL)shouldAutorotate {
    return XXX;
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    return XXX;
}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    return XXX;
}

这样自定义了3个基类:
- BaseTabBarController : UITabBarController
- BaseNavigationController : UINavigationController
- BaseViewController : UIViewController

当然,你也可以用Category的方式自定义控制器,原理是一样的,如果你们的工程已经是一个代码量很庞大的工程,我建议使用Category,我们这里用继承的方式。

我们所有创建的UIViewController都采用继承BaseViewController,这样能够一下控制所有页面的基础旋转状态。
例如,绝大部分的视图都不能旋转,处于Portrait方向,而某些特定个视图控制器能够旋转,那我在BaseViewController中定义控制器只支持Portrait方向,并且不能够旋转,然后在需要能够自由旋转的那个视图控制器里重写旋转的几个方法即可。


介绍完由容器控制旋转如何转化成当前控制器旋转,接下来就是要讲控制器旋转是怎么个实现方法了
  • 前提:当控制器的shouldAutorotate返回YES
  • 1.自动旋转

· Orientation_App_Support和Orientation_VC_Support之间所支持方向的交集就是我们控制器能够自动旋转到的方向
· Orientation_App_Support和Orientation_VC_Support之间没有交集的时候(即没有相同的方向),那么你的程序会在展示这个控制器的时候挂掉,错误信息如下:

Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [XXXController shouldAutorotate] is returning YES'
  • 2.手动强制控制器旋转
/*调用前请保证shouldAutorotate返回YES*/
if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)]) {
    SEL selector = NSSelectorFromString(@"setOrientation:");
    NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[UIDevice instanceMethodSignatureForSelector:selector]];
    [invocation setSelector:selector];
    [invocation setTarget:[UIDevice currentDevice]];
    int val = UIInterfaceOrientationLandscapeRight;//这个方向即需要旋转到的那个方向,自行设置
    [invocation setArgument:&val atIndex:2];
    [invocation invoke];
}

一定要注意前提,两种旋转都是要在shouldAutorotate返回YES的情况下才能完成的。


学会了旋转,让我们来看看旋转后页面该用什么方式布局

记住以下几点即可:
- 1.用AutoLayout约束过的控件,在旋转过后会按照约束重构视图的位置大小。
- 2.旋转过后,会调用子控件的layoutSubViews方法(建议自定义视图的布局均在视图layoutSubviews中书写)
- 3.旋转过后会在控制器中调用如下方法(根据iOS系统版本不同有差别)

/*iOS8以上,旋转控制器后会调用*/
 - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id <UIViewControllerTransitionCoordinator>)coordinator NS_AVAILABLE_IOS(8_0);
/*iOS8以下,旋转控制器后会调用*/
 - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration

在这两个方法中,给控制器中的控件进行布局即可,具体操作自己摸索一下便知,不再详述。

请阅读完以上屏幕旋转的基本知识,下面我们根据这个理论来总结配置一下我们的工程


1.首先是AppDelegate.m
/*
  1.建议去掉General里Device Orientation的勾选用代码方式设置。
  2.建议在AppDelegate.h里设置公有属性,通过设置该属性来灵活改变App支持方向。
  3.此方法在shouldAutorotate返回YES时会触发。
*/
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
    if (self.Rotate) {
        return UIInterfaceOrientationMaskAll;
    }else {
        switch (self.type) {
            case RotationTypeOne:
                return UIInterfaceOrientationMaskLandscape;
                break;
            case RotationTypeTwo:
                return UIInterfaceOrientationMaskPortrait;
                break;
            default:
                return UIInterfaceOrientationMaskPortrait;
                break;
        }
    }
}
2.自定义BaseTabBarController.m容器
- (instancetype)init {
    if (self = [super init]) {
        [self setupViewControllers];
        self.selectedIndex = 0;
    }
    return self;
}


- (void)setupViewControllers {
    /*创建childViewControllers,以下代码可以自定义*/
    NSArray *vcClassNames = @[@"ViewController1", @"ViewController2", @"ViewController3", @"ViewController4"];
    NSArray *vcNames = @[@"控制器1",@"控制器2",@"控制器3",@"控制器4"];

    for (NSInteger i = 0; i < vcClassNames.count; i ++) {
        NSString *vcClassName = vcClassNames[i];
        Class vcClass = NSClassFromString(vcClassName);
        UIViewController *vc = [[vcClass alloc] init];

        NavigationController *navController = [[NavigationController alloc] initWithRootViewController:vc];
        vc.navigationItem.title = [NSString stringWithFormat:@"控制器%ld", i + 1];
        [navController.tabBarItem setTitle:vcNames[i]];
        [self addChildViewController:navController];
    }
}


- (BOOL)shouldAutorotate {
    return [self.selectedViewController shouldAutorotate];
}


- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    return [self.selectedViewController preferredInterfaceOrientationForPresentation];
}


- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    return [self.selectedViewController supportedInterfaceOrientations];
}

2.自定义BaseNavigtionController.m容器
- (BOOL)shouldAutorotate {
    return [self.topViewController shouldAutorotate];
}


- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    return [self.topViewController supportedInterfaceOrientations];
}


- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    return [self.topViewController preferredInterfaceOrientationForPresentation];
}
3.自定义BaseViewController.m
/*这里按需return旋转策略*/
- (BOOL)shouldAutorotate {
    return NO;
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    return UIInterfaceOrientationPortrait;
}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskPortrait;
}
4.控制某一个ViewController的旋转
@implementation CustomViewController
{
    BOOL _shouldAutorotate;
    UIButton *button;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(0, 0, 100, 100);
    button.center = self.view.center;
    button.backgroundColor = [UIColor redColor];
    [button setTitle:@"Allowed Rotation" forState:UIControlStateNormal];
    [button setTitle:@"Not Allowed Rotation" forState:UIControlStateSelected];
    button.titleLabel.font = [UIFont systemFontOfSize:12];
    [button addTarget:self action:@selector(allowedRotation:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
}

- (void)dismissVC {
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)allowedRotation:(UIButton *)button {
    button.selected = !button.selected;
    _shouldAutorotate = button.selected;
}

- (BOOL)shouldAutorotate {
    return _shouldAutorotate;
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    return UIInterfaceOrientationPortrait;
}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    if (_shouldAutorotate) {
        return UIInterfaceOrientationMaskAll;
    }
    else {
        return UIInterfaceOrientationPortrait;
    }
}

/*iOS8以上,旋转控制器后会调用*/
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
    button.center = CGPointMake(size.width / 2.f - button.bounds.size.width / 2.f, size.height / 2.f - button.bounds.size.height / 2.f);
}

/*iOS8以下,旋转控制器后会调用*/
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
    if (toInterfaceOrientation == UIInterfaceOrientationPortrait) {
        button.center = self.view.center;
    }
    else {
        button.center = CGPointMake(self.view.bounds.size.width / 2.f - button.bounds.size.width / 2.f, self.view.bounds.size.height / 2.f - button.bounds.size.height / 2.f);
    }
}

以上基本上满足了目前iOS6以上屏幕旋转的需求,其实不难,摸清楚原理后很容易避免错误,还有一些设备旋转的监听事件我就不列举了,暂时感觉没什么用处,如果仍有疑问可以留言询问。

这里有一个简单的Demo,不建议在不看以上原理的情况下阅读

保姆级教程:在RK3576上配置USB网卡从零到外网访问(附udev规则详解) 本文提供了在RK3576开发板上配置USB网卡的完整教程,涵盖从内核驱动、udev规则到网络路由的全流程。重点讲解了如何利用USB Gadget功能实现高速网络连接,并构建稳定的算力集群,确保多设备间通信及外网访问。 阅读详情

相关推荐

S32K344 Bootloader实战:一个按键实现从Boot到App的无缝跳转(附完整代码)

本文详细介绍了基于NXP S32K344微控制器的Bootloader开发实战,重点解析如何通过一个硬件按键实现从Boot到App的可靠跳转。内容涵盖内存分区规划、中断向量表重映射、外设初始状态管理等核心要素,并提供了完整的代码示例和调试技巧,适用于汽车电子和工业控制等高可靠性应用场景。

weixin_29192365的博客 307

iOS应用横竖屏切换

一、概述:    在iOS应用中,由UIViewController来控制屏幕翻转,根据需要随设备方向自动切换。在iOS6和之前的系统之间,控制方法发生了些变化。二、视图伸缩属性:1.UIView类的autoresizingMask属性,用来指定当它的父视图frame发生变化时,自身frame的变化规则。此属性可以在XIB中设置,也可以直接用代码设置,具体用哪个看情况。可用值的具体含义如下:

有志者事竟成-程序员也可以创造优雅的艺术 1239

四自由度机械臂Matlab仿真全流程:从DH参数建模到轨迹规划实战

本文详细介绍了四自由度机械臂在Matlab中的完整仿真流程,从DH参数建模到轨迹规划实战。通过Robotics Toolbox工具,读者可以学习如何构建机械臂模型、验证运动学特性,并实现平滑的轨迹规划。文章还提供了性能优化技巧和常见问题解决方案,帮助开发者高效完成机械臂仿真项目。

weixin_29061041的博客 238

设备方向,视图控制器方向和视图方向,监测与设置,以及相互之间的关系

设备方向 视图控制器方向 视图方向

realyezi的博客 1541

TeXstudio完整安装配置教程(2025最新版)

至此,你已经完成了TeXstudio的完整安装和配置!现在你可以:✅ 使用TeXstudio编写LaTeX文档✅ 正确编译中英文混排的文档✅ 掌握基本的编辑和配置技巧LaTeX的学习曲线较陡,但一旦掌握,你会发现它在学术写作中的强大之处。建议从简单的文档开始练习,逐步掌握更高级的功能。祝你LaTeX写作顺利!如果有任何问题,欢迎在评论区留言交流。关键词:TeXstudio安装、LaTeX环境配置、中文LaTeX、TeX Live、学术论文写作更新日期:2025年10月。

weixin_51241407的博客 4492

基因家族快速鉴定指南:Windows平台下的HMMER实战解析

本文详细解析了在Windows平台下使用HMMER工具进行基因家族快速鉴定的完整实战流程。通过手把手指导,从软件获取、数据准备到模型构建与序列搜索,帮助生物信息学新手无需Linux环境,即可高效完成bZIP转录因子等家族的鉴定工作,大幅降低分析门槛。

weixin_29255731的博客 457

iOS页面旋转详解

前言 在iOS开发中,如果APP需要支持横屏,就要控制页面旋转,但是让页面支持旋转的方式有很多,在此总结一下,说一下我对页面旋转的理解。 思路 控制页面旋转的方式可以总结为两种,第一种是通过全局设置来控制,第二种是页面自己单独控制。 1.修改全局设置来实现 第一种是通过勾选方向让页面支持旋转。 第二种是通过修改info.plist文件Supported interface orientatio...

weixin_34127717的博客 407

【Google Play 上架】内部 / 封闭 / 开放 测试全解 — “只跑一个就能上架”?不行!

Google Play新规要求个人开发者账号在2023年11月13日后必须通过封闭测试(Closed testing)才能上架应用。封闭测试需要至少12名测试者连续14天保持参与状态,而内部测试和开放测试不能替代这一要求。三类测试轨道各有特点:内部测试用于快速内部验证,封闭测试是上架必经环节,开放测试面向更广泛用户但非必需。上架流程建议先内部测试修复问题,再启动封闭测试满足14天要求,最后申请生产发布。组织账号和早期个人账号可能不受此限制。开发者应提前规划测试人群,确保持续测试周期,并关注Play Cons

技术小甜甜:传播可落地技术,帮助个人和企业降低解决真实场景问题的成本 2798

iOS 设置横屏导致崩溃!

0x00 *** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'preferredInterfaceOrientationForPresentation 'landscapeLeft' must match a supported interface or...

豪冷的博客 2998

内网渗透(二)之基础知识-工作组介绍

在一个大型单位里,可能有成百上千台计算机互相连接组成局域网,它们都会列在"网络"(网上邻居)内。如果不对这些计算机进行分组,网络的混乱程度是可想而知的 为了解决这一问题,产生了工作组( Work Group)这个概念。将不同的计算机按功能(或部 门)分别列入不同的工作组,例如技术部的计算机都列入"技术部"工作组、行政部的计算机都 列入"行政部"工作组。要想访问某个部门的资源,只要在"网络"里双击该部门的工作组名 就可以看到该部门的所有计算机了。相比不分组的情况,这样的情况有序得多(尤其对大型局域网来说)。

把自己活成一道光,因为你不知道,谁会借着你的光,走出了黑暗。请保持心中的善良,因为你不知道,谁会借着你的善良,走出了绝望。请保持你心中的信仰,因为你不知道,谁会借着你的信仰,走出了迷茫。请相信自己的力量,因为你不知道,谁会因为相信你,开始相信了自己.... 1219

搭建自己的MQTT服务器,实现设备上云(Ubuntu+EMQX)

这篇文章教大家在ECS云服务器上部署EMQX,搭建自己私有的MQTT服务器,配置EMQX实现设备上云,设备数据转发,存储;服务器我采用的华为云的ECS服务器,系统选择Ubuntu系统。

2万+

iOS 屏幕旋转的实践解析

摘要:如何更灵活便捷的实现自定义屏幕旋转场景,本文带你揭秘! 文|即构 iOS 应用开发团队 屏幕旋转是在视频直播类 APP 中常见的场景,在即构科技之前发布的 Roomkit SDK 中也有屏幕跟随手机自动旋转的场景。 在 Roomkit SDK 自身开发和客户接入的过程中我们也会发现,实现屏幕旋转的需求往往没有那么顺利,经常会出现无法旋转、旋转后布局适配等问题。 本篇文章根据我们以往的开发经验整理了屏幕旋转实现的相关实践方法,解析在实现过程中遇到的常见问题。 一、快速实现旋转

ZEGO即构科技 1981

ros系统在Debian系统上的移植

摘要:本文详细介绍了在Debian系统上移植ROS(机器人操作系统)的完整流程。主要内容包括:1)Debian版本与ROS版本的对应关系;2)配置软件源和安装依赖的具体命令;3)安装ROS核心组件和开发工具的步骤;4)常见兼容性问题的解决方案;5)性能优化和维护建议。重点强调了版本匹配的重要性,推荐选择LTS版本组合(如Debian11+ROS Noetic),并提供了从基本安装到自定义功能包编译的全套方案。文中包含详细的终端命令,可帮助用户顺利完成ROS移植并解决可能遇到的问题。

start_up_go的博客 1490

IOS6屏幕旋转详解

IOS6屏幕旋转详解(自动旋转、手动旋转、兼容IOS6之前系统) 分类: ios2012-11-21 20:02 7618人阅读 评论(9) 收藏 举报 目录(?)[+] 概述: 在iOS6之前的版本中,通常使用 shouldAutorotateToInterfaceOrientation 来单独控制某个UIViewController的方向,需要哪

ajiao的专栏 487

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

IOS6屏幕旋转详解(自动旋转、手动旋转、兼容IOS6之前系统) .

转自:http://blog.youkuaiyun.com/cococoolwhj/article/details/8208991 概述: 在iOS6之前的版本中,通常使用 shouldAutorotateToInterfaceOrientation 来单独控制某个UIViewController的方向,需要哪个viewController支持旋转,只需要重写shouldAutorotateToI

iOS开发专栏 1197

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

IOS6屏幕旋转详解(自动旋转、手动旋转、兼容iOS6 之前)

转http://blog.youkuaiyun.com/cococoolwhj/article/details/8208991# 概述: 在iOS6之前的版本中,通常使用 shouldAutorotateToInterfaceOrientation 来单独控制某个UIViewController的方向,需要哪个viewController支持旋转,只需要重写shouldAutorotate

暖 687

IOS6屏幕旋转详解(自动旋转、手动旋转、兼容IOS6之前系统)

分类: iphone开发2012-12-03 12:14 4271人阅读 评论(3) 收藏 举报 目录(?)[+] 转自:http://blog.youkuaiyun.com/cococoolwhj/article/details/8208991 概述: 在iOS6之前的版本中,通常使用 shouldAutorotateToInterfaceOrientation

yuanya的专栏 602
下一篇: iOS开发代码规范
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值