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

标签 ios objective-c ios7 xcode5

所以我在 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/

相关文章:

xcode4.5 - 当 IOS 7 启动时,为 ios 6 构建的所有应用程序看起来都很好吗?

ios - UINavigationBar 中的 UISegmentedControll 奇怪的截图 iOS

iphone - 在 iOS 中对图层应用蒙版后如何捕获屏幕?

mysql - iOS - mySQL (apache) 和 iOS (NSDate) 之间时间戳的正确格式

ios - 提交到 App Store 问题 : Unsupported Architecture x86

ios - 将 segue 添加到分割 View Controller

iphone - 尝试在 objective-c 中提交 Reddit 链接时生成的 error.USER_REQUIRED

ios - 无法将 UIButton 的自定义类更改为 GIDSignInButton

iphone - 自定义 Nib UITableViewCell 高度

ios - UINavigationBar下的多个UITableView