ios - UIImageView 的拉伸(stretch)属性有什么用。我如何使用此属性。?

标签 ios objective-c xcode swift uiimageview

enter image description here

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

最佳答案

拉伸(stretch)属性非常简单,正如 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

关于ios - UIImageView 的拉伸(stretch)属性有什么用。我如何使用此属性。?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37413585/

相关文章:

ios - 如何使 UIButton 文本对齐中心?使用 IB

ios - 在单个工作区中管理多个项目的依赖关系

ios - 如何在不同的机器上构建和签署 iOS 应用程序?

objective-c - 为什么我的原型(prototype)单元格显示为空白?

iOS Quartz 2D 如何将图层扩展到屏幕框架之外

iphone - 内存管理问题

ios - NSNotification MPVideoplayercontroller 崩溃 - ARC

objective-c - 获取 iOS 支持的货币列表

iphone - 我可以在不使用MDM的情况下在iOS Developer Enterprise Program上使用APNS吗

ios - iOS程序化分组表为空