• 得到ios设备的屏幕尺寸信息


    iPhone 4S 屏幕信息

     

    //  [[UIApplicationsharedApplication] setStatusBarHidden:YES];  状态栏占20高度

     

    UIScreen *currentScreen = [UIScreenmainScreen];

    NSLog(@"applicationFrame.size.height = %f",currentScreen.applicationFrame.size.height);

    NSLog(@"applicationFrame.size.width = %f",currentScreen.applicationFrame.size.width);

    NSLog(@"applicationFrame.origin.x = %f",currentScreen.applicationFrame.origin.x);

    NSLog(@"applicationFrame.origin.y = %f",currentScreen.applicationFrame.origin.y);

    NSLog(@"bounds.x = %f",currentScreen.bounds.origin.x);

    NSLog(@"bounds.y = %f",currentScreen.bounds.origin.y);

    NSLog(@"bounds.height = %f",currentScreen.bounds.size.height);

    NSLog(@"bounds.width = %f",currentScreen.bounds.size.width);

    NSLog(@"brightness = %f",currentScreen.brightness);

     

    applicationFrame.size.height = 460

    applicationFrame.size.width = 320

    applicationFrame.origin.x = 0

    applicationFrame.origin.y = 20

    bounds.x = 0

    bounds.y = 0

    bounds.height = 480

    bounds.width = 320

    brightness = 0.392892

     

    iPad4

    applicationFrame.size.height = 1004

    applicationFrame.size.width = 768

    applicationFrame.origin.x = 0

    applicationFrame.origin.y = 20

    bounds.x = 0

    bounds.y = 0

    bounds.height = 1024

    bounds.width = 768

    brightness = 0.787293

  • 相关阅读:
    MIN (Transact-SQL)【转】
    ROW_NUMBER() OVER函数的基本用法用法【转】
    读取文件中的内容
    Stopwatch 和TimeSpan介绍【转】
    TimeSpan类【转】
    Stopwatch 类【转】
    ToString()使用方法
    用c#读取文件内容中文是乱码的解决方法:
    vue实现购物车和地址选配(二)
    vue实现购物车和地址选配
  • 原文地址:https://www.cnblogs.com/sell/p/2835621.html
Copyright © 2020-2023  润新知