gpt4 book ai didi

swift - 设置突变 TableViewController 的背景图像

转载 作者:行者123 更新时间:2023-11-30 12:19:26 26 4
gpt4 key购买 nike

我现在正在 Xcode 中开发一个 swift 项目,我的 View Controller 之一是 UITableViewController。我使用 swift 来改变 Controller 中表格 View 的大小,使其不会填满整个屏幕。但是,我想为整个 View Controller 设置背景图像,但我无法做到这一点,因为 XCode 不允许我在 TableView Controller 和 TableView 之间添加 ImageView 。有什么办法可以使用 swift 来做到这一点吗?谢谢。

最佳答案

我想我可以帮忙。

如果您使用 Apple 的 UITableViewController - 这是否意味着您更改了 Storyboard中 tableView 的高度?我认为更好的解决方案是只使用常规的 UIViewController,在 UIViewController 的 View 中添加一个具有任意高度的 tableView 。

很多时候我会建议不要使用苹果的自定义东西,因为你会失去灵 active 。只需制作您自己的定制产品即可!

UIViewController > View > TableView 和 UIImageView

确保您的桌面 View 有清晰的背景!

关于swift - 设置突变 TableViewController 的背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44979319/

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