zoukankan      html  css  js  c++  java
  • ipad上自定义view的旋转适配

    ios8横屏时宽高会自动转换,但是ios7不是

       CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;

        CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;

        if (!iOS8)

        {

            UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation];

            if (UIInterfaceOrientationIsLandscape(interfaceOrientation))

            {

                CGFloat tmp = screenWidth;

                screenWidth = screenHeight;

                screenHeight = tmp;

            }

        }

       

  • 相关阅读:
    SQL Server 存储过程
    String.format Tutorial
    第五次
    第四次
    第三次
    第一次作业
    第二次
    c/c++
    HelloWorld出现的问题
    Android系统架构
  • 原文地址:https://www.cnblogs.com/zhangliukou/p/4486825.html
Copyright © 2011-2022 走看看