• IOS翻转注意


    翻转时,要计算好。如下是6个button的翻转中 frame 的改变

    - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
    {
        if (toInterfaceOrientation == UIInterfaceOrientationPortrait || toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {//翻转0或180度时的情况
            button1.frame = CGRectMake(20, 20, 125, 125);
            button2.frame = CGRectMake(175, 20, 125, 125);
            button3.frame = CGRectMake(20, 168, 125, 125);
            button4.frame = CGRectMake(175, 168, 125, 125);
            button5.frame = CGRectMake(20, 315, 125, 125);
            button6.frame = CGRectMake(175, 315, 125, 125);
        }
        else                                                          //翻转90或270度时的情况
        {
            button1.frame = CGRectMake(20, 20, 125, 125);
            button2.frame = CGRectMake(20, 155, 125, 125);
            button3.frame = CGRectMake(177, 20, 125, 125);
            button4.frame = CGRectMake(177, 155, 125, 125);
            button5.frame = CGRectMake(328, 20, 125, 125);
            button6.frame = CGRectMake(328, 155, 125, 125);        
        }
    }

  • 相关阅读:
    docker 安装 clickhouse单机版
    CockRoachDB简介
    Ubuntu18.04 LTS Cockroach集群搭建
    ClickHouse 的一些优化参数
    ClickHouse 概念整理
    OOM Killer机制
    win10系统下载地址
    Quartz.Net在C#中的使用
    JavaScript的undefined与null、NaN的区别
    Java Web基础回顾 —JSP
  • 原文地址:https://www.cnblogs.com/tx8899/p/2536352.html
Copyright © 2020-2023  润新知