How to know the image size after applying aspect fit for the image in an UIImageView(在 UIImageView 中应用适合图像的宽高比后如何知道图像大小)
问题描述
我正在将图像加载到模式为Aspect Fit"的图像视图中.我需要知道我的图像被缩放到的大小.请帮忙.
I am loading an image to an imageview with mode as 'Aspect Fit'. I need to know the size to which my image is being scaled to. Please help.
推荐答案
请看@Paul-de-Lange 的回答,而不是这个
我在一个易于访问的变量中找不到任何东西,所以这是蛮力方法:
I couldn't find anything in an easily accessible variable that had this, so here is the brute force way:
这篇关于在 UIImageView 中应用适合图像的宽高比后如何知道图像大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!