zoukankan      html  css  js  c++  java
  • 横竖屏切换

    viewWillLayoutSubviews  这个函数是切换横竖屏的接口

    这个方法在viewcontroller里面响应,view是不响应的
    - (void)viewWillLayoutSubviews

    {
        
        [self _shouldRotateToOrientation:(UIDeviceOrientation)[UIApplication sharedApplication].statusBarOrientation];
        
    }

    -(void)_shouldRotateToOrientation:(UIDeviceOrientation)orientation {
        if (orientation == UIDeviceOrientationPortrait ||orientation ==
            UIDeviceOrientationPortraitUpsideDown) {
            // 竖屏
            
            
        }else {
            // 横屏
            
            
            
        }
    }

  • 相关阅读:
    Javascript
    CSS3新增特性HTML标签类型
    HTML5新增的标签
    prototype __proto__ Function
    oninput
    extend
    hasOwnProperty()
    this prototype constructor
    Array类型判断
    指针
  • 原文地址:https://www.cnblogs.com/luningning0901/p/5198536.html
Copyright © 2011-2022 走看看