开发者

Difference between UIViewContentModeScaleAspectFit and UIViewContentModeScaleToFill?

开发者 https://www.devze.com 2023-02-09 01:28 出处:网络
what is the diffe开发者_如何学Gorence between UIViewContentModeScaleAspectFit and UIViewContentModeScaleToFill...?You can see the differences between the content modes here:

what is the diffe开发者_如何学Gorence between UIViewContentModeScaleAspectFit and UIViewContentModeScaleToFill...?


You can see the differences between the content modes here:

Difference between UIViewContentModeScaleAspectFit and UIViewContentModeScaleToFill?

Redraw mode works as Scale to Fill mode. But there is a difference in how they are drawn when view geometry changes. Scale to Fill mode uses already rendered content while Redraw mode renders the content again.


If you are talking about UIViewContentMode, the following is from the Doc.

UIViewContentModeScaleToFill

Scales the content to fit the size of itself by changing the aspect ratio of the content if necessary.

UIViewContentModeScaleAspectFit

Scales the content to fit the size of the view by maintaining the aspect ratio. Any remaining area of the view’s bounds is transparent.

UIViewContentModeScaleAspectFill

Scales the content to fill the size of the view. Some portion of the content may be clipped to fill the view’s bounds.


uiimageview-scaling-explained-visually

Difference between UIViewContentModeScaleAspectFit and UIViewContentModeScaleToFill?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号