gpt4 book ai didi

iOS UITableView 背景图片居中

转载 作者:行者123 更新时间:2023-11-28 22:38:43 26 4
gpt4 key购买 nike

我有一张设计师为 iPhone 5 屏幕制作的背景图片,我想将其用作我的 TableView 的背景。不过,该图像比旧版 iPhone 上的图像要大,而且被压缩了,这导致它看起来很奇怪。有没有办法让它在电视中居中而不调整它的大小?谢谢。

最佳答案

尝试将 UITableView 的 backgroundView 上的 contentMode 设置为 UIViewContentModeCenterUIViewContentModeScaleAspectFit

关于iOS UITableView 背景图片居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15192364/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com