所以我在 XCode 5 和 iOS 7 中工作,并尝试将可编辑的 UITextFields 添加到一系列 UITableViewCells。在 Storyboard 上看起来一切都很好,但是当我运行应用程序时,单元格中看不到任何文本,并且单元格不允许编辑。
在应用程序中,它只是几个空白单元格。有什么想法吗?
最佳答案
请引用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/