zoukankan      html  css  js  c++  java
  • 定义了一个UIImageView如何使加载的图片不会失真 UIImageView的Frame值是固定的

    定义了一个UIImageView如何使加载的图片不会失真  UIImageView的Frame值是固定的

    UIViewContentModeScaleToFill, 缩放内容到合适比例大小
    UIViewContentModeScaleAspectFit, 缩放内容到合适的大小,边界多余部分透明
    UIViewContentModeScaleAspectFill, 缩放内容填充到指定大小,边界多余的部分省略
    UIViewContentModeRedraw, 重绘视图边界
    UIViewContentModeCenter, 视图保持等比缩放
    UIViewContentModeTop, 视图顶部对齐
    UIViewContentModeBottom, 视图底部对齐
    UIViewContentModeLeft, 视图左侧对齐
    UIViewContentModeRight, 视图右侧对齐
    UIViewContentModeTopLeft, 视图左上角对齐
    UIViewContentModeTopRight, 视图右上角对齐
    UIViewContentModeBottomLeft, 视图左下角对齐
    UIViewContentModeBottomRight, 视图右下角对齐

    imagView.contentMode = UIViewContentModeCenter;

  • 相关阅读:
    python面向对象__call__
    python的上下文管理协议
    python析构方法__del__
    next和iter可迭代协议
    __slots__ 用法
    定制自己的数据类型
    内置的Attr系列
    反射和自省
    isinstance和issubclass
    BLE 学习
  • 原文地址:https://www.cnblogs.com/Camier-myNiuer/p/3315088.html
Copyright © 2011-2022 走看看