加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – UIImageView的拉伸属性有什么用.我如何使用这个属性.

发布时间:2020-12-14 19:44:03 所属栏目:百科 来源:网络整理
导读:我想知道如何将此属性用于UIImageView. 解决方法 如Karol Kozub在 this article中所述,拉伸属性非常简单: The fraction of the original image left without stretching on the left is specified by X The fraction of the original image that gets stret

enter image description here

我想知道如何将此属性用于UIImageView.

解决方法

如Karol Kozub在 this article中所述,拉伸属性非常简单:

The fraction of the original image left without stretching on the left
is specified by X

The fraction of the original image that gets stretched in the x-axis
is specified by Width

The fraction of the original image left without stretching on the
right is equal to 1 – X – Width

If we use 0 for Width the stretched area will interpolate between
the last pixel of the left part and the first pixel of the right part

The y-axis works analogously

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读