什么是UIImageView的拉伸属性的用途。我如何使用这个属性。 [英] What is use of stretching property of UIImageView. How I can use this property.?

查看:120
本文介绍了什么是UIImageView的拉伸属性的用途。我如何使用这个属性。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I want to know how can i use this property for UIImageView.

推荐答案

拉伸属性非常简单,如Karol Kozub所述这篇文章

Stretching properties are pretty simple, as stated by Karol Kozub in this article:


没有拉伸的原始图像的分数在左边
由X指定

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

在x轴上拉伸的原始图像的分数
由宽度指定

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


右边没有拉伸的原始图像的分数等于1 - X - 宽度

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

如果我们使用0表示宽度,拉伸区域将在
左右的最后一个像素和冷杉之间进行插值右边部分的像素

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

y轴类似地工作

这篇关于什么是UIImageView的拉伸属性的用途。我如何使用这个属性。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆