更改UIImageView模式iPhone / iPad [英] Change UIImageView mode iPhone/iPad
本文介绍了更改UIImageView模式iPhone / iPad的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我有一个模式设置为居中的UIImageView,例如如何将其更改为其他内容,例如适合代码的方面?
If I have an UIImageView with the mode set to center for example how can I change it to something else such as aspect fit with code?
推荐答案
imageView.contentMode = UIViewContentModeScaleAspectFit;
这篇关于更改UIImageView模式iPhone / iPad的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文