zoukankan      html  css  js  c++  java
  • ios10适配

    1: 去除打印多余的log信息: xcode-->Product-->Scheme-->edite Scheme 中在Ecvironment Variables 中添加OS_ACTIVITY_MODE = Disable
    2: 注释快捷键无效:修改方法再终端中输入 sudo /usr/libexec/xpccachectl
    然后必须重启电脑后生效     你也可以在 Xcode 的 Editor->Structure 里找到一项 ADD Documentation,点击此选项一样可以达到相同效果。

    3:iOS 10 开始对隐私权限更加严格,如果你不设置就会直接崩溃,现在很多遇到崩溃问题了,一般解决办法都是在info.plist文件添加对应的Key-Value就可以了。

     4   iOS 10 判断系统版本方式更新

    判断系统版本是我们经常用到的,尤其是现在大家都有可能需要适配iOS 10,那么问题就出现了,如下图:

    我们得到了答案是:

    //值为 1
    [[[[UIDevice currentDevice] systemVersion] substringToIndex:1] integerValue]

    //值为10.000000
    [[UIDevice currentDevice] systemVersion].floatValue,

    //值为10.0
    [[UIDevice currentDevice] systemVersion] 推荐使用

    Swift判断如下:

    if #available(iOS 10.0, *) {
    // iOS 10.0
    print("iOS 10.0");
    } else { } 

  • 相关阅读:
    poj 1743 Musical Theme 后缀数组
    poj 1743 Musical Theme 后缀数组
    cf 432D Prefixes and Suffixes kmp
    cf 432D Prefixes and Suffixes kmp
    hdu Data Structure? 线段树
    关于position和anchorPoint之间的关系
    ios POST 信息
    CALayers的代码示例
    CALayers详解
    ios中得sqlite使用基础
  • 原文地址:https://www.cnblogs.com/tian-sun/p/5902923.html
Copyright © 2011-2022 走看看