Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个设计师为 iPhone 5 屏幕制作的背景图片,我想将其用作我的 TableView 的背景。不过,图像比旧 iPhone 上的图像要大,而且会被压缩,这使它看起来很奇怪。有没有办法让它在电视中居中而不调整它的大小?谢谢。
尝试将contentModeUITableView 上的设置backgroundView为UIViewContentModeCenter或UIViewContentModeScaleAspectFit。
contentMode
backgroundView
UIViewContentModeCenter
UIViewContentModeScaleAspectFit