gpt4 book ai didi

ios - UITableViewCell 中的 UITextField 未在运行时出现

转载 作者:行者123 更新时间:2023-11-29 10:54:23 25 4
gpt4 key购买 nike

所以我在 XCode 5 和 iOS 7 中工作,并尝试将可编辑的 UITextFields 添加到一系列 UITableViewCells。在 Storyboard 上看起来一切都很好,但是当我运行应用程序时,单元格中看不到任何文本,并且单元格不允许编辑。

Storyboard中的截图: screenshot

在应用程序中,它只是几个空白单元格。有什么想法吗?

最佳答案

请引用UITableView with static cells does not appear

One more thing about static cells, they only work in UITableViewController. The Storyboard Editor will let you add them to a Table View object inside a regular UIViewController, but this won’t work during runtime. The reason for this is that UITableViewController provides some extra magic to take care of the data source for the static cells. Xcode even prevents you from compiling such a project with the error message: “Illegal Configuration: Static table views are only valid when embedded in UITableViewController instances”.

关于ios - UITableViewCell 中的 UITextField 未在运行时出现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19075304/

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