所以在 UIView
文档中你有:
However, if the transform property contains a non-identity transform, the value of the frame property is undefined and should not be modified. In that case, you can reposition the view using the center property and adjust the size using the bounds property instead.
很明显,在应用转换后,我不应该更改 frame
的值来重新定位或调整它的大小,但是 frame
中的值是否仍然有效并使感觉?即我仍然可以使用它们进行计算吗?
在我应用转换的 UIImageView
中,bounds
中的值根本没有改变,似乎反射(reflect)了 UIImageView< 的大小
改造前。
最佳答案
文档非常清楚 -
the value of the frame property is undefined
因此,如果安装了非恒等式转换,则不能依赖 frame 属性来获得合理的值。
关于ios - "value of the frame property is undefined and should not be modified"的含义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28820774/