美文网首页
IOS 小知识点

IOS 小知识点

作者: LeeDev | 来源:发表于2017-11-01 11:27 被阅读16次
    1. IOS 11 适配问题
    automaticallyAdjustsScrollViewInsets:属性 在IOS11 不能用了
    UIScrollView 换成 contentInsetAdjustmentBehavior ,传入`UIScrollViewContentInsetAdjustmentNever`
    @property(nonatomic,assign) BOOL automaticallyAdjustsScrollViewInsets API_DEPRECATED_WITH_REPLACEMENT("Use UIScrollView's contentInsetAdjustmentBehavior instead", ios(7.0,11.0),tvos(7.0,11.0)); // Defaults to YES
    
    
    1. LaunchImage设置
    iphone 适配
    LaunchImage  
    iphoneX : 1125 * 2436
    iphonePlus:1242 × 2208
    iphone6/7:750 × 1334
    iphone5s:640 × 1136
    iphone4s:640 × 960
    以及json:
    {
      "images" : [
        {
          "extent" : "full-screen",
          "idiom" : "iphone",
          "subtype" : "736h",
          "filename" : "LaunchImage1242_2208.png",
          "minimum-system-version" : "8.0",
          "orientation" : "portrait",
          "scale" : "3x"
        },
        {
          "extent" : "full-screen",
          "idiom" : "iphone",
          "subtype" : "667h",
          "filename" : "LaunchImage750_1334.png",
          "minimum-system-version" : "8.0",
          "orientation" : "portrait",
          "scale" : "2x"
        },
        {
          "orientation" : "portrait",
          "idiom" : "iphone",
          "filename" : "LaunchImage640_960.png",
          "extent" : "full-screen",
          "minimum-system-version" : "7.0",
          "scale" : "2x"
        },
        {
          "extent" : "full-screen",
          "idiom" : "iphone",
          "subtype" : "retina4",
          "filename" : "LaunchImage640_1136.png",
          "minimum-system-version" : "7.0",
          "orientation" : "portrait",
          "scale" : "2x"
        },
        {
          "extent" : "full-screen",
          "idiom" : "iphone",
          "subtype" : "2436h",
          "filename" : "LaunchImage1125_2436.png",
          "minimum-system-version" : "11.0",
          "orientation" : "portrait",
          "scale" : "3x"
        },
    
      ],
      "info" : {
        "version" : 1,
        "author" : "xcode"
      }
    }
    
    
    1. icon 的配置
    1. 20icon: 40_40, 60_60, 
    2. 29icon: 58_58, 87_87
    3. 40icon:80_80,120_120
    4. 60icon:120_120,180_180
    5. 1024_1024
    
    

    相关文章

      网友评论

          本文标题:IOS 小知识点

          本文链接:https://www.haomeiwen.com/subject/hpbwpxtx.html